-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There should be separate Delayed Worker queues based on priority / importance #4065
Comments
I did some investigation on how to set up the queues. It's pretty simple.
# config/initializers/delayed_job.rb
Delayed::Worker.queue_attributes = {
queue_name: { priority: -10 }, #this is high prio
name_of_queue: { priority: 10 } # low prio
} Those values can also be overridden if needed with Thus, the question is, what should be the priorities? These are all the mailers and jobs in the application. @awwaiid lemme know what you think priorities should be. account_request_mailer.rb historical_data_cache_job.rb <- Should be low prio Note: you can also have workers dedicated to certain queues. Not sure if there is any value to that, or how many workers are actually being ran. |
From our call - I think a single |
Right now we have a single default queue for Delayed Worker. This queue is shared by both HistoricalDataCacheJob and other jobs. We should separate HistoricalDataCacheJob at least into a separate queue so that if it gets backed we still send emails. This implements a single low_priority queue that only the historical data cache is in, and then all the rest can remain at a higher-priority in default. Note: lower prio number => higher prio. Also priority cannot be explicitly tested in job specs, the test queue adapter intercepts the job before delayed_job sets the priority from the queue. It does work tho, I promise :)
(assinging this after the fact) |
fix(#4065): make low_prio queue for caching
Summary
Right now we have a single
default
queue for Delayed Worker. This queue is shared by both HistoricalDataCacheJob and other jobs. We should separate HistoricalDataCacheJob at least into a separate queue so that if it gets backed we still send emails.Things to consider
Criteria for Completion
The text was updated successfully, but these errors were encountered: