diff options
| -rw-r--r-- | app/jobs/mailer_job.rb | 3 | ||||
| -rw-r--r-- | app/workers/clean_up_worker.rb | 1 | ||||
| -rw-r--r-- | app/workers/line_referential_sync_worker.rb | 2 | ||||
| -rw-r--r-- | app/workers/stop_area_referential_sync_worker.rb | 2 | ||||
| -rw-r--r-- | config/initializers/sidekiq.rb | 2 | 
5 files changed, 7 insertions, 3 deletions
| diff --git a/app/jobs/mailer_job.rb b/app/jobs/mailer_job.rb index 3918745b8..eb3250a27 100644 --- a/app/jobs/mailer_job.rb +++ b/app/jobs/mailer_job.rb @@ -1,6 +1,9 @@  class MailerJob < ActiveJob::Base    # No need to specify queue it's already used mailers queue +  # This job will be retried, unlike Sidekiq jobs which are configured +  # to not retry +    def perform klass, action, params      klass.constantize.public_send(action, *params).deliver_later    end diff --git a/app/workers/clean_up_worker.rb b/app/workers/clean_up_worker.rb index 2d76b3a68..9a7c3aa5a 100644 --- a/app/workers/clean_up_worker.rb +++ b/app/workers/clean_up_worker.rb @@ -1,6 +1,5 @@  class CleanUpWorker    include Sidekiq::Worker -  sidekiq_options :retry => false    def perform(id)      cleaner = CleanUp.find id diff --git a/app/workers/line_referential_sync_worker.rb b/app/workers/line_referential_sync_worker.rb index 253b8a53c..1303a63fd 100644 --- a/app/workers/line_referential_sync_worker.rb +++ b/app/workers/line_referential_sync_worker.rb @@ -1,6 +1,6 @@  class LineReferentialSyncWorker    include Sidekiq::Worker -  sidekiq_options :retry => false +  sidekiq_options retry: true    def process_time      Process.clock_gettime(Process::CLOCK_MONOTONIC, :second) diff --git a/app/workers/stop_area_referential_sync_worker.rb b/app/workers/stop_area_referential_sync_worker.rb index 08bcf4f5f..3de351a91 100644 --- a/app/workers/stop_area_referential_sync_worker.rb +++ b/app/workers/stop_area_referential_sync_worker.rb @@ -1,6 +1,6 @@  class StopAreaReferentialSyncWorker    include Sidekiq::Worker -  sidekiq_options :retry => false +  sidekiq_options retry: true    def process_time      Process.clock_gettime(Process::CLOCK_MONOTONIC, :second) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 724aaecc5..a177e7091 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -13,3 +13,5 @@ end  Sidekiq.configure_client do |config|    config.redis = { url: ENV.fetch('SIDEKIQ_REDIS_URL', 'redis://localhost:6379/12') }  end + +Sidekiq.default_worker_options = { retry: false } | 
