From 3ddef37f7d0fb811a392106677503c90901cbcf6 Mon Sep 17 00:00:00 2001 From: Luciabrightcode Date: Tue, 23 Dec 2025 15:26:19 +0800 Subject: [PATCH] fix(worker): align redis key and fix async task dispatch - Change blpop key from 'task_queue' to 'tasks' - Pass coroutine object directly to dispatcher to prevent silent await failure --- src/orchestrator/worker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/orchestrator/worker.py b/src/orchestrator/worker.py index 578acad..aa63279 100644 --- a/src/orchestrator/worker.py +++ b/src/orchestrator/worker.py @@ -30,7 +30,7 @@ class TaskWorker: try: # Blocking pop from task queue # task format: {"type": "auth|extract", "url": "...", "session_id": "..."} - task_data = await self.redis.blpop("task_queue", timeout=5) + task_data = await self.redis.blpop("tasks", timeout=5) if not task_data: continue @@ -40,7 +40,7 @@ class TaskWorker: # Apply entropy scheduling (variable delay) await self.scheduler.dispatch_with_entropy( - lambda: self.process_task(task) + self.process_task(task) ) except Exception as e: