Mbonea commited on
Commit
0fe435d
·
1 Parent(s): 573a4e0

performance boost

Browse files
Files changed (2) hide show
  1. App/app.py +3 -3
  2. Dockerfile +1 -1
App/app.py CHANGED
@@ -47,7 +47,7 @@ def authjwt_exception_handler(request: Request, exc: AuthJWTException):
47
 
48
  @app.on_event("startup")
49
  async def startup_event():
50
- await bot.start(bot_token="6183919505:AAEhHFt4mI18bQeAf2Lj7AePXFRPVLrOFM8")
51
  # await upload_bot.start()
52
  # await models.create_all()
53
  # models.metadata.create_all()
@@ -59,8 +59,8 @@ async def startup_event():
59
 
60
  @app.on_event("shutdown")
61
  async def shutdown_event():
62
- bot.session.save()
63
- await bot.disconnect()
64
 
65
  # await upload_bot.stop()
66
  if not database.is_connected:
 
47
 
48
  @app.on_event("startup")
49
  async def startup_event():
50
+ # await bot.start(bot_token="6183919505:AAEhHFt4mI18bQeAf2Lj7AePXFRPVLrOFM8")
51
  # await upload_bot.start()
52
  # await models.create_all()
53
  # models.metadata.create_all()
 
59
 
60
  @app.on_event("shutdown")
61
  async def shutdown_event():
62
+ # bot.session.save()
63
+ # await bot.disconnect()
64
 
65
  # await upload_bot.stop()
66
  if not database.is_connected:
Dockerfile CHANGED
@@ -22,7 +22,7 @@ USER admin
22
  COPY --chown=admin . /srv
23
 
24
  # Command to run the application
25
- CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 1 & celery -A App.Worker.celery worker -c 8 --loglevel=info
26
 
27
  # Expose the server port
28
  EXPOSE 7860
 
22
  COPY --chown=admin . /srv
23
 
24
  # Command to run the application
25
+ CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 8 & celery -A App.Worker.celery worker -c 8 --loglevel=info
26
 
27
  # Expose the server port
28
  EXPOSE 7860