Skip to content

Question about deferred and recurring tasks #722

Answered by ewjoachim
paulzakin asked this question in Q&A
Discussion options

You must be logged in to vote

The general rule is that when a worker decides what's the next job to tackle, it selects, among the available ones, the one with the lowest (incremental) id. This means if you have 100 long tasks deferred and one short task waiting after that, in general it will get executed after the 100 tasks (namely, there's no way to tell if a task will be long or short, and we try to have tasks be executed in a somewhat predictable order).

Now there are still some things worth mentioning. Before diving in the details, there's one point that needs addressing. I might be wrong, but if you create 100 tasks that all take 100 seconds, I see 3 possible outcomes:

  • Your workers can process this before the ne…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@paulzakin
Comment options

Answer selected by paulzakin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants