Ekimart commited on
Commit
26cd7c2
·
1 Parent(s): 1d8ad25

Simplifier le point d'entrée principal en encapsulant l'initialisation dans une fonction `main` et ajuster `_lifespan` pour utiliser un paramètre non utilisé.

Browse files
Files changed (1) hide show
  1. main.py +6 -3
main.py CHANGED
@@ -71,7 +71,7 @@ class WebSocketNotificationService:
71
  )
72
 
73
  @asynccontextmanager
74
- async def _lifespan(self, app: FastAPI):
75
  self.logger.info("🚀 Starting WebSocket notification service")
76
 
77
  try:
@@ -403,7 +403,10 @@ class WebSocketNotificationService:
403
  )
404
 
405
 
406
- if __name__ == "__main__":
407
  service = WebSocketNotificationService()
408
  service.run()
409
- app = service.app
 
 
 
 
71
  )
72
 
73
  @asynccontextmanager
74
+ async def _lifespan(self, _app: FastAPI):
75
  self.logger.info("🚀 Starting WebSocket notification service")
76
 
77
  try:
 
403
  )
404
 
405
 
406
+ def main():
407
  service = WebSocketNotificationService()
408
  service.run()
409
+
410
+
411
+ if __name__ == "__main__":
412
+ main()