Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
vrr: run cron at different times [prod,stage]
Browse files Browse the repository at this point in the history
  • Loading branch information
mcritchlow committed Jun 10, 2019
1 parent e0a19ec commit fe78083
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions config/schedule.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
env 'RAILS_RELATIVE_URL_ROOT', '/dc'

every 1.hour do
rake "aeon_requests:process_new"
end

every 1.day do
rake "aeon_requests:revoke_old"
# Note: The AEON API currently has a problem processing concurrent requests
# So we're offsetting the cron times to try avoiding that for now
# This should be able to be deleted in the future
case @environment
when 'production'
every 1.hour do
rake "aeon_requests:process_new"
end
every 1.day do
rake "aeon_requests:revoke_old"
end
when 'staging'
every '50 * * * *' do
rake "aeon_requests:process_new"
end
every 1.day, at: '1:00 am' do
rake "aeon_requests:revoke_old"
end
end

0 comments on commit fe78083

Please sign in to comment.