Fix jobs showing double: lpush was in both router AND Celery task
The job ID was pushed to extraction:user_jobs:{uid} twice:
1. quizzes.py router when dispatching the job
2. quiz_tasks.py Celery task when it starts running
Removed the push from the Celery task. Router handles it.
Also cleaned 13 duplicate entries from Redis.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9def89aac3
commit
24fb00aef2
1 changed files with 0 additions and 2 deletions
|
|
@ -51,8 +51,6 @@ def extract_quiz(
|
||||||
):
|
):
|
||||||
r = _redis()
|
r = _redis()
|
||||||
r.set(f"extraction:status:{job_id}", "running", ex=EXPIRE_SECONDS)
|
r.set(f"extraction:status:{job_id}", "running", ex=EXPIRE_SECONDS)
|
||||||
r.lpush(f"extraction:user_jobs:{user_id}", job_id)
|
|
||||||
r.expire(f"extraction:user_jobs:{user_id}", 86400)
|
|
||||||
|
|
||||||
db = SessionLocal()
|
db = SessionLocal()
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue