celery beat schedule: why one same task is completed in different time durations?

211 Views Asked by At

I have used celery-beat to get data from about 30 different APIs and save them in database. There are two prblems:

first: why it takes so long to do the task (i thought it shouldn't take more than 2-3 seconds)?

second: why a single task takes different time durations to be done?

celery:

enter image description here

terminal:

enter image description here

1

There are 1 best solutions below

0
On

We can't answer this question without knowing the task code. It's likely that the APIs you use sometimes respond slower to you.

Calls to the API are characterized by the fact that they will have different response times.