This commit is contained in:
@@ -40,5 +40,10 @@ async def handle_callback(call: types.CallbackQuery):
|
|||||||
await call.message.answer("Таймер остановлен ⏹")
|
await call.message.answer("Таймер остановлен ⏹")
|
||||||
await call.answer()
|
await call.answer()
|
||||||
|
|
||||||
|
from pomodoro_bot.redis_client import init_redis
|
||||||
|
|
||||||
|
async def on_startup(dispatcher):
|
||||||
|
await init_redis()
|
||||||
|
|
||||||
def run_bot():
|
def run_bot():
|
||||||
executor.start_polling(dp, skip_updates=True)
|
executor.start_polling(dp, skip_updates=True, on_startup=on_startup)
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
import asyncio
|
|
||||||
from pomodoro_bot.bot import run_bot
|
from pomodoro_bot.bot import run_bot
|
||||||
from .redis_client import init_redis
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
asyncio.run(init_redis())
|
|
||||||
run_bot()
|
run_bot()
|
||||||
Reference in New Issue
Block a user