]> cat aescling's git repositories - mastodon.git/commitdiff
Change the retry limit in error of web push notification (#11292)
authorhan@highemelry <high.emerly.ytfin@gmail.com>
Fri, 12 Jul 2019 16:46:21 +0000 (01:46 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 12 Jul 2019 16:46:21 +0000 (18:46 +0200)
- Change the maximum count of retry for web push notification (Default -> 5).
   - In case of high load of subscribe server, the retries will be repeated many times.
   - Because the retries occupy the default queue, maximum retry count should be reduced.

app/workers/web/push_notification_worker.rb

index 8e8a359735674ea753a6b0fed60b5ab71f90cf9a..90104397581aacdcf9f21c58f518c1849bc2c6e0 100644 (file)
@@ -3,7 +3,7 @@
 class Web::PushNotificationWorker
   include Sidekiq::Worker
 
-  sidekiq_options backtrace: true
+  sidekiq_options backtrace: true, retry: 5
 
   def perform(subscription_id, notification_id)
     subscription = ::Web::PushSubscription.find(subscription_id)