diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-10-13 10:02:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 10:02:49 +0200 |
commit | 8ff161a4b02d395ec81f9f6331e0e11f8e81363c (patch) | |
tree | 5fcc055e81075520842cf335a6b671f17001e0bc /lib | |
parent | 6b5c54f6998ed9ebe99e9c047e077cffdd7827b6 (diff) | |
parent | e234e5b21e1099f615b137a57458bf7f3fe3321f (diff) |
Merge pull request #160 from solidusio-contrib/aldesantis/maximum-retry-period
Add maximum_reprocessing_attempts preference
Diffstat (limited to 'lib')
-rw-r--r-- | lib/generators/solidus_subscriptions/install/templates/initializer.rb | 4 | ||||
-rw-r--r-- | lib/solidus_subscriptions/configuration.rb | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/generators/solidus_subscriptions/install/templates/initializer.rb b/lib/generators/solidus_subscriptions/install/templates/initializer.rb index e1e9731..150f439 100644 --- a/lib/generators/solidus_subscriptions/install/templates/initializer.rb +++ b/lib/generators/solidus_subscriptions/install/templates/initializer.rb @@ -22,6 +22,10 @@ SolidusSubscriptions.configure do |config| # Time between an installment failing to be processed and the system retrying to fulfill it. # config.reprocessing_interval = 1.day + # Maximum number of times the system attempts to reprocess a failed payment before cancelling + # the subscription (`nil` is the default and will make the system reprocess indefinitely). + # config.maximum_reprocessing_attempts = nil + # ========================================= Dispatchers ========================================== # # These dispatchers are pluggable. If you override any handlers, it is highly encouraged that you diff --git a/lib/solidus_subscriptions/configuration.rb b/lib/solidus_subscriptions/configuration.rb index 22b7d84..9cf1408 100644 --- a/lib/solidus_subscriptions/configuration.rb +++ b/lib/solidus_subscriptions/configuration.rb @@ -3,7 +3,8 @@ module SolidusSubscriptions class Configuration attr_accessor( - :maximum_total_skips, :churn_buster_account_id, :churn_buster_api_key, + :maximum_total_skips, :maximum_reprocessing_attempts, :churn_buster_account_id, + :churn_buster_api_key, ) attr_writer( |