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
This commit is contained in:
parent
fcc4d44a55
commit
3ddef37f7d
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue