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

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
@georgeclaghorn georgeclaghorn deleted the activestorage-split-queues branch January 2, 2019 00:41
@@ -117,6 +117,20 @@ class Engine < Rails::Engine # :nodoc:
end
end

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need an after_initialize here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants