wrongmove/crawler/tasks
Viktor Barzin 7e8f1f0339
Fix live logs: replace monkey-patch with direct log injection
The previous approach monkey-patched task.update_state on the Celery
Task instance, but the assignment didn't take effect (Celery's Task
singleton may prevent instance method shadowing). Additionally, the
celery.task logger level was left at WARNING by Celery's worker setup,
silencing all INFO-level log capture.

Fix:
- Replace wrapper with _update_task_state() helper that directly injects
  logs from a module-level _active_log_buffer into every meta dict
- Attach TaskLogHandler to BOTH celery.task and uvicorn.error loggers
- Force both loggers to INFO level during task execution
- Every task.update_state call site now uses _update_task_state()
2026-02-06 23:13:01 +00:00
..
listing_tasks.py Fix live logs: replace monkey-patch with direct log injection 2026-02-06 23:13:01 +00:00
task_state.py migrate background tasks to celery 2025-06-22 21:18:52 +00:00