Skip to content

Commit

Permalink
Merge pull request #2508 from alphagov/whenever
Browse files Browse the repository at this point in the history
Fix cache warming schedule again
  • Loading branch information
sihugh authored May 11, 2021
2 parents 366356d + 7540942 commit 9718df5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
bundler_prefix = ENV.fetch("BUNDLER_PREFIX", "/usr/local/bin/govuk_setenv finder-frontend")
job_type :rake, "cd :path && #{bundler_prefix} bundle exec rake :task :output"

cache_refresh_schedule = Random.new.rand(0..60)
every cache_refresh_schedule.minutes do
random_minute_per_hour = Random.new.rand(0..59)
every "#{random_minute_per_hour} * * * *" do
rake "registries:cache_refresh"
end

Expand Down

0 comments on commit 9718df5

Please sign in to comment.