diff --git a/lib/periodic_jobs.rb b/lib/periodic_jobs.rb index 205d2817977..8fb7ebc2ead 100644 --- a/lib/periodic_jobs.rb +++ b/lib/periodic_jobs.rb @@ -48,6 +48,9 @@ # Checks status of Flipper features expected to be enabled and alerts to Slack if any are not enabled mgr.register('0 2,9,16 * * 1-5', 'AppealsApi::FlipperStatusAlert') + # Update alternative Banners data every 10 minutes + mgr.register('*/10 * * * *', 'Banners::UpdateAll') + # Update static data cache mgr.register('0 0 * * *', 'Crm::TopicsDataJob') diff --git a/modules/banners/app/sidekiq/banners/update_all_banners.rb b/modules/banners/app/sidekiq/banners/update_all_job.rb similarity index 90% rename from modules/banners/app/sidekiq/banners/update_all_banners.rb rename to modules/banners/app/sidekiq/banners/update_all_job.rb index 4c4d9caac8e..5daded94b51 100644 --- a/modules/banners/app/sidekiq/banners/update_all_banners.rb +++ b/modules/banners/app/sidekiq/banners/update_all_job.rb @@ -1,12 +1,12 @@ -require 'sidekiq' +# frozen_string_literal: true module Banners - class UpdateAllBanners + class UpdateAllJob include Sidekiq::Job STATSD_KEY_PREFIX = 'banners.sidekiq.update_all_banners' - sidekiq_options retry: 7 + sidekiq_options retry: 5 sidekiq_retries_exhausted do |msg, _ex| job_id = msg['jid'] @@ -51,7 +51,7 @@ def perform private def enabled? - true #should consider bringing in a flipper here + true #should consider bringing in a flipper heres end end end