M
M
mr_drinkens892015-04-14 01:32:18
Django
mr_drinkens89, 2015-04-14 01:32:18

How to dynamically set celery time??

Is it possible to somehow specify the task start time dynamically? Essence. There are several tasks that have a start time set (different distributions). in Celeri I set a task that every second accesses the task and looks at what to run. Is it possible to somehow dynamically set the start time? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Shikanov, 2015-04-14
@dizballanze

apply_async is there for this, here is an example from the documentation:

>>> from datetime import datetime, timedelta

>>> tomorrow = datetime.utcnow() + timedelta(days=1)
>>> add.apply_async((2, 2), eta=tomorrow)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question