Skip to content

Commit

Permalink
add job to 10m rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowboardTechie committed Nov 21, 2024
1 parent 6ebb274 commit 8421ed8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions lib/periodic_jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Original file line number Diff line number Diff line change
@@ -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']
Expand Down Expand Up @@ -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

Check failure on line 54 in modules/banners/app/sidekiq/banners/update_all_job.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/LeadingCommentSpace: Missing space after `#`.
end
end
end

0 comments on commit 8421ed8

Please sign in to comment.