diff options
author | Pratik <pratiknaik@gmail.com> | 2019-02-06 18:28:49 -0600 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2019-02-06 19:28:49 -0500 |
commit | d0037daa3738ac754781ce5e55778a2cf9d3d2f7 (patch) | |
tree | 8d8a6c476baf7f85373c182bdbc8dc75835521c1 /actionmailbox/lib | |
parent | 9cc463ed7b7be098602b72a98f72220ea6466ba2 (diff) | |
download | rails-d0037daa3738ac754781ce5e55778a2cf9d3d2f7.tar.gz rails-d0037daa3738ac754781ce5e55778a2cf9d3d2f7.tar.bz2 rails-d0037daa3738ac754781ce5e55778a2cf9d3d2f7.zip |
Allow skipping incineration of processed emails
Diffstat (limited to 'actionmailbox/lib')
-rw-r--r-- | actionmailbox/lib/action_mailbox.rb | 1 | ||||
-rw-r--r-- | actionmailbox/lib/action_mailbox/engine.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/actionmailbox/lib/action_mailbox.rb b/actionmailbox/lib/action_mailbox.rb index b4ff25a9ab..772dbd6529 100644 --- a/actionmailbox/lib/action_mailbox.rb +++ b/actionmailbox/lib/action_mailbox.rb @@ -11,6 +11,7 @@ module ActionMailbox mattr_accessor :ingress mattr_accessor :logger + mattr_accessor :incinerate, default: true mattr_accessor :incinerate_after, default: 30.days mattr_accessor :queues, default: {} end diff --git a/actionmailbox/lib/action_mailbox/engine.rb b/actionmailbox/lib/action_mailbox/engine.rb index d5a07a7dce..27334c037e 100644 --- a/actionmailbox/lib/action_mailbox/engine.rb +++ b/actionmailbox/lib/action_mailbox/engine.rb @@ -14,6 +14,7 @@ module ActionMailbox config.eager_load_namespaces << ActionMailbox config.action_mailbox = ActiveSupport::OrderedOptions.new + config.action_mailbox.incinerate = true config.action_mailbox.incinerate_after = 30.days config.action_mailbox.queues = ActiveSupport::InheritableOptions.new \ @@ -22,6 +23,7 @@ module ActionMailbox initializer "action_mailbox.config" do config.after_initialize do |app| ActionMailbox.logger = app.config.action_mailbox.logger || Rails.logger + ActionMailbox.incinerate = app.config.action_mailbox.incinerate.nil? ? true : app.config.action_mailbox.incinerate ActionMailbox.incinerate_after = app.config.action_mailbox.incinerate_after || 30.days ActionMailbox.queues = app.config.action_mailbox.queues || {} end |