How do scheduled tasks work under the covers with Bull? #1986
Unanswered
amehta-plume
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Because repeatable jobs are just delayed jobs, when you add a delay job the workers will get notified on when the delayed job should run, so they wait until then (unless they are already waiting for a delayed job that should run earlier). However there are some watchdogs so it is not completely poll free but almost. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm fairly new to redis and Bull. As per the documentation https://github.com/OptimalBits/bull/blob/develop/README.md#bull-features bull has " Minimal CPU usage due to a polling-free design.".
I'm curious, for a use case like scheduled tasks/cron triggers using bull, how does this actually work under the covers? Is there some documentation/code that indicates how that works? If there's no/minimal polling from bull to redis, how does it trigger scheduled tasks accurately?
For example, when I add a repeatable/cron task to the queue,
I notice that its using a
hash
to store the information about the repeatable task. I'm wondering how that makes things work though.Thank you.
Beta Was this translation helpful? Give feedback.
All reactions