celery run old code and new code at same time

Created on 20 Oct 2016  路  3Comments  路  Source: celery/celery

Hi,all!!
I use celery to run my django task. After i change my code yesterday, i find celery run both my old code and new code.So when i pass same parameter to task, sometimes i get error, sometimes it excutes successfully. i have tryd purge, restart celery, but all uesless.
Can anyone tell me what happened

Question

Most helpful comment

Didi you find any solution to it? I am having same problem with my local machine and in my production server.

All 3 comments

Purge should have purged everything (celery -A projectName purge), but if you're using the Django Database Scheduler in Django Admin area, and have not removed unwanted tasks using this, it might be re-instating them.
I'm not an expert, just trying to help.

Didi you find any solution to it? I am having same problem with my local machine and in my production server.

Didi you find any solution to it? I am having same problem with my local machine and in my production server.

I faced with the same problem today. The steps that helped me:

  1. Stop all workers.
  2. Clear python cache in project dir. This command will clear __pychache__ content across all dirs:
    find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
  3. Restart a server.
Was this page helpful?
0 / 5 - 0 ratings