From be7ffa2d7539d5a1946a3933cb9d242b9fac0ddc Mon Sep 17 00:00:00 2001 From: abcang Date: Wed, 6 Sep 2017 03:56:20 +0900 Subject: Do not execute the job with the same arguments as the retry job (#4814) --- config/application.rb | 1 + config/initializers/sidekiq.rb | 3 +++ 2 files changed, 4 insertions(+) (limited to 'config') diff --git a/config/application.rb b/config/application.rb index b6ce74147..f98f7af16 100644 --- a/config/application.rb +++ b/config/application.rb @@ -10,6 +10,7 @@ require_relative '../app/lib/exceptions' require_relative '../lib/paperclip/gif_transcoder' require_relative '../lib/paperclip/video_transcoder' require_relative '../lib/mastodon/version' +require_relative '../lib/mastodon/unique_retry_job_middleware' Dotenv::Railtie.load diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index b70784d79..61e131336 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -13,4 +13,7 @@ end Sidekiq.configure_client do |config| config.redis = redis_params + config.client_middleware do |chain| + chain.add Mastodon::UniqueRetryJobMiddleware + end end -- cgit