C
C
client242017-12-19 03:33:35
Python
client24, 2017-12-19 03:33:35

How to stop a Celery task from running?

There is such a task,
it should be repeated until the config.IS_WORK variable changes

@app.task(bind=True)
def test(self):
    if config.IS_WORK:
        self.retry(countdown=3)

The variable changes
but the task continues to run
celery caches the task?
maybe there is a nicer way to solve my problem

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question