mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2025-09-11 13:00:40 +03:00
reworked to poetry run
This commit is contained in:
parent
58f2cfde4c
commit
aa4751fd06
@ -1,3 +1,4 @@
|
||||
from aiogram import Dispatcher
|
||||
from aiogram.utils.executor import start_webhook
|
||||
from core.bot import bot, dispatcher
|
||||
from core.logger import logger
|
||||
@ -5,12 +6,12 @@ from core.scheduler import asyncio_schedule
|
||||
from settings import WEBAPP_HOST, WEBAPP_PORT, WEBHOOK_PATH, WEBHOOK_URL
|
||||
|
||||
|
||||
async def on_startup() -> None:
|
||||
async def on_startup(dp: Dispatcher) -> None:
|
||||
await bot.set_webhook(WEBHOOK_URL)
|
||||
asyncio_schedule()
|
||||
|
||||
|
||||
async def on_shutdown() -> None:
|
||||
async def on_shutdown(dp: Dispatcher) -> None:
|
||||
logger.warning('Shutting down..')
|
||||
|
||||
# Remove webhook (not acceptable in some cases)
|
||||
|
Loading…
x
Reference in New Issue
Block a user