Domanda

I have scheduled a task using django celery (djcelery) by defining it as so:

@periodic_task(run_every=timedelta(minutes=1))
def mytask():
    # Do something

I decided to remove this task from the codebase.

However, even after restarting the celery server, this task continues to be scheduled every 1 minute, although it reports an error message since this task no longer exists. Do I have to do something to clear old periodic tasks from the djcelery database, in addition to restarting the server?

È stato utile?

Soluzione

You might need to remove your task from the table djcelery_periodictask as well.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top