mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2026-02-03 11:20:56 +03:00
changed to gunicorn
This commit is contained in:
@@ -66,9 +66,14 @@ async def webhook(request: web.Request) -> web.Response:
|
||||
return web.Response(status=HTTPStatus.OK)
|
||||
|
||||
|
||||
async def on_startup_gunicorn(app: web.Application) -> None:
|
||||
await dispatcher.bot.set_webhook(WEBHOOK_URL)
|
||||
|
||||
|
||||
async def create_app() -> web.Application:
|
||||
application = web.Application()
|
||||
application.router.add_post('/', webhook)
|
||||
application.on_startup.append(on_startup_gunicorn)
|
||||
return application
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user