K
K
KIN19912017-10-02 17:13:13
Python
KIN1991, 2017-10-02 17:13:13

Is Celery suitable for this task?

Good day!
There is a python script that takes data from the database and puts it in redis.
This script has 2 methods:
1) updating all data
2) updating the latest data
I want to execute these two methods periodically, 1st time per day, 2nd time in five seconds.
I plan to use Celery, the question is, will Celery tasks execute tasks sequentially? That is, let's say I will use both methods in the same queue, and when the execution of the 1st method starts, the execution of the 2nd will not start until the execution of the 1st is completed? Did I understand everything correctly?
And another question is what is the best practice for such tasks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2017-10-20
@Jazzis

Maybe a chain of tasks .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question