Skip to content

Commit

Permalink
Set Redis retry strategy for emergency banner
Browse files Browse the repository at this point in the history
This brings the Redis connection retry strategy in line with the
configuration specified in `govuk_sidekiq` [1].

1: https://github.com/alphagov/govuk_sidekiq/blob/32def77d86d929ca7eb48f35f08401fedeb8407d/lib/govuk_sidekiq/sidekiq_initializer.rb#L10-L12
  • Loading branch information
brucebolt committed Sep 11, 2024
1 parent 116a981 commit 18fcdfc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/emergency_banner/display.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ module EmergencyBanner
class Display
class << self
def client
@client ||= Redis.new(timeout: 0.1)
@client ||= Redis.new(
reconnect_attempts: 4,
reconnect_delay: 15,
reconnect_delay_max: 60,
)
end
end

Expand Down

0 comments on commit 18fcdfc

Please sign in to comment.