diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-05 03:28:21 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-05 03:28:21 +0100 |
commit | 6c28886317bdf837e7e3f399115af91ac282735e (patch) | |
tree | 243f57e7e712108fbd10d45247e877240b4d6b33 /app/workers/pubsubhubbub | |
parent | 251b04298e826818ecb48c2fdf96a83649e14e93 (diff) |
Improve background jobs params and error handling
Diffstat (limited to 'app/workers/pubsubhubbub')
-rw-r--r-- | app/workers/pubsubhubbub/confirmation_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pubsubhubbub/delivery_worker.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/workers/pubsubhubbub/confirmation_worker.rb b/app/workers/pubsubhubbub/confirmation_worker.rb index 489bd8359..868fd9f97 100644 --- a/app/workers/pubsubhubbub/confirmation_worker.rb +++ b/app/workers/pubsubhubbub/confirmation_worker.rb @@ -4,7 +4,7 @@ class Pubsubhubbub::ConfirmationWorker include Sidekiq::Worker include RoutingHelper - sidekiq_options queue: 'push' + sidekiq_options queue: 'push', retry: false def perform(subscription_id, mode, secret = nil, lease_seconds = nil) subscription = Subscription.find(subscription_id) diff --git a/app/workers/pubsubhubbub/delivery_worker.rb b/app/workers/pubsubhubbub/delivery_worker.rb index 35bf7b2f0..15005bc80 100644 --- a/app/workers/pubsubhubbub/delivery_worker.rb +++ b/app/workers/pubsubhubbub/delivery_worker.rb @@ -4,7 +4,11 @@ class Pubsubhubbub::DeliveryWorker include Sidekiq::Worker include RoutingHelper - sidekiq_options queue: 'push', retry: 5 + sidekiq_options queue: 'push', retry: 3, dead: false + + sidekiq_retry_in do |count| + 5 * (count + 1) + end def perform(subscription_id, payload) subscription = Subscription.find(subscription_id) |