This commit is contained in:
@@ -11,6 +11,7 @@ class TimerManager:
|
||||
await self.stop_timer(user_id)
|
||||
|
||||
async def timer():
|
||||
print(f"[DEBUG] Timer started for user {user_id}, label={label}, sleeping for {duration} sec")
|
||||
await asyncio.sleep(duration)
|
||||
print(f"[DEBUG timer] label={label!r}")
|
||||
if label == 'Pomodoro':
|
||||
@@ -23,6 +24,7 @@ class TimerManager:
|
||||
|
||||
loop = asyncio.get_running_loop()
|
||||
task = loop.create_task(timer())
|
||||
print(f"[DEBUG] Timer task created for user {user_id} with label {label}")
|
||||
user = user_manager.get_user(user_id)
|
||||
user.current_timer = label
|
||||
user.task = task
|
||||
|
||||
Reference in New Issue
Block a user