Skip to content
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

Permit sending Active Storage purge and analysis jobs to separate queues #34838

Merged
merged 1 commit into from Jan 2, 2019
Merged

Permit sending Active Storage purge and analysis jobs to separate queues #34838

merged 1 commit into from Jan 2, 2019

Conversation

@georgeclaghorn
Copy link
Contributor

@georgeclaghorn georgeclaghorn commented Jan 1, 2019

Replace config.active_storage.queue with config.active_storage.queues.analysis and config.active_storage.queues.purge. Prefer config.active_storage.queue when it’s set, emitting a deprecation warning.

Match Action Mailbox, which similarly allows configuring each of its two jobs to use different queues.

@georgeclaghorn georgeclaghorn merged commit ed51351 into rails:master Jan 2, 2019
2 checks passed
@georgeclaghorn georgeclaghorn deleted the activestorage-split-queues branch Jan 2, 2019
@@ -117,6 +117,20 @@ class Engine < Rails::Engine # :nodoc:
end
end

initializer "active_storage.queues" do
config.after_initialize do |app|
Copy link
Member

@rafaelfranca rafaelfranca Jan 4, 2019

do we need an after_initialize here?

Copy link
Contributor Author

@georgeclaghorn georgeclaghorn Jan 4, 2019

I think we do, since config.active_storage.queue may be set in an initializer.

Copy link
Member

@rafaelfranca rafaelfranca Jan 4, 2019

oh, that is true. For other frameworks we use on_load but I think we don't/can't have a hook for Active Storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants