79264844

Date: 2024-12-09 11:48:21
Score: 0.5
Natty:
Report link

I had an issue like this. when I run celery with this

"celery -A tasks worker --loglevel=INFO"

After pressing Ctrl+C, it breaks Celery run, but for the second time, when I run the code again, it starts continuing preview tasks again. After some research, I understand Celery has a queue for tasks. After breaking with ctrl+c, the queue would not be clean. so in second time, it runs the queue(which is not cleaned yet). to solve the issue. I cleaned the queue and then run again and it solved

cleaning celery queue with the command "celery -A tasks purge -f"

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mehdi Hamzeloee