diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/action_mailbox.rb | 1 | ||||
-rw-r--r-- | lib/action_mailbox/engine.rb | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/action_mailbox.rb b/lib/action_mailbox.rb index a508e861ac..aec2db7b05 100644 --- a/lib/action_mailbox.rb +++ b/lib/action_mailbox.rb @@ -11,4 +11,5 @@ module ActionMailbox mattr_accessor :ingress mattr_accessor :logger mattr_accessor :incinerate_after, default: 30.days + mattr_accessor :queues, default: {} end diff --git a/lib/action_mailbox/engine.rb b/lib/action_mailbox/engine.rb index cf438d8f24..e0954e4e49 100644 --- a/lib/action_mailbox/engine.rb +++ b/lib/action_mailbox/engine.rb @@ -8,10 +8,14 @@ module ActionMailbox config.action_mailbox = ActiveSupport::OrderedOptions.new config.action_mailbox.incinerate_after = 30.days + config.action_mailbox.queues = ActiveSupport::InheritableOptions.new \ + incineration: :action_mailbox_incineration, routing: :action_mailbox_routing + initializer "action_mailbox.config" do config.after_initialize do |app| ActionMailbox.logger = app.config.action_mailbox.logger || Rails.logger ActionMailbox.incinerate_after = app.config.action_mailbox.incinerate_after || 30.days + ActionMailbox.queues = app.config.action_mailbox.queues || {} end end |