B
B
bQ12019-11-11 14:20:37
Django
bQ1, 2019-11-11 14:20:37

Why is a task forked that is set for more than an hour in django-celery + redis?

If an asynchronous task is set for more than an hour, then it is split into two and, as a result, is executed 2 times. In the next iteration, each of these is again divisible by 2, and so on... What the hell? However, this happens ONLY on tasks longer than an hour.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maks2025, 2019-11-12
@bQ1

The parameter is called visibility_timeout, the problem appears to be only with redis ( https://docs.celeryproject.org/en/latest/getting-s... Default 1 hour app.conf.broker_transport_options = {'visibility_timeout': 3600} Logically, you need = eta(countdown) + visibility_timeout There is a discussion here https://github.com/celery/kombu/issues/337.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question