aboutsummaryrefslogtreecommitdiffstats
path: root/config/initializers/sidekiq.rb
blob: e44d8df52cc7eef0424afc1b179ee7c83df20b8e (plain)
1
2
3
4
5
6
7
8
9
10
Sidekiq.configure_server do |config|
  if ENV["CHOUETTE_SIDEKIQ_CANCEL_SYNCS_ON_BOOT"]
    [
      LineReferentialSync.pending,
      StopAreaReferentialSync.pending
    ].each do |pendings|
      pendings.map { |sync| sync.failed({error: 'Failed by Sidekiq reboot', processing_time: 0}) }
    end
  end
end