This commit is contained in:
@@ -12,8 +12,13 @@ class TimerManager:
|
|||||||
|
|
||||||
async def timer():
|
async def timer():
|
||||||
await asyncio.sleep(duration)
|
await asyncio.sleep(duration)
|
||||||
|
print(f"[DEBUG timer] label={label!r}")
|
||||||
if label == 'Pomodoro':
|
if label == 'Pomodoro':
|
||||||
await user_manager.increment_pomodoros(user_id)
|
try:
|
||||||
|
await user_manager.increment_pomodoros(user_id)
|
||||||
|
print(f"[DEBUG] Pomodoro count incremented for {user_id}")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"[ERROR] Failed to increment pomodoros: {e}")
|
||||||
await self.bot.send_message(chat_id, f"⏰ {label} завершён!")
|
await self.bot.send_message(chat_id, f"⏰ {label} завершён!")
|
||||||
|
|
||||||
loop = asyncio.get_running_loop()
|
loop = asyncio.get_running_loop()
|
||||||
|
|||||||
Reference in New Issue
Block a user