Skip to content

Commit 89ce5d1

Browse files
authored
Merge pull request #1539 from sul-dlss/rename-bg-role
Rename the background job role to 'cron'
2 parents 56b584b + cdb9b25 commit 89ce5d1

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

config/deploy.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838

3939
set :honeybadger_env, fetch(:stage)
4040

41-
set :whenever_roles, [:whenevs]
41+
# Role for scheduled one-off tasks that run on a single machine
42+
set :whenever_roles, [:cron]
4243

4344
# update shared_configs before restarting app
4445
before 'deploy:restart', 'shared_configs:update'

config/deploy/prod.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# Deploys to all production nodes
2-
31
set :bundle_without, %w[test development deployment].join(' ')
42

53
server 'earthworks-prod-a.stanford.edu', user: 'geostaff', roles: %w[web db app]
64
server 'earthworks-prod-b.stanford.edu', user: 'geostaff', roles: %w[web db app]
7-
server 'earthworks-worker-prod-a.stanford.edu', user: 'geostaff', roles: %w[app background whenevs]
5+
server 'earthworks-worker-prod-a.stanford.edu', user: 'geostaff', roles: %w[app background cron]
86

97
Capistrano::OneTimeKey.generate_one_time_key!
108
set :rails_env, 'production'

config/deploy/stage.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
server 'earthworks-stage-a.stanford.edu', user: 'geostaff', roles: %w[web db app]
44
server 'earthworks-stage-b.stanford.edu', user: 'geostaff', roles: %w[web db app]
5-
server 'earthworks-worker-stage-a.stanford.edu', user: 'geostaff', roles: %w[app background]
5+
server 'earthworks-worker-stage-a.stanford.edu', user: 'geostaff', roles: %w[app background cron]
66

77
Capistrano::OneTimeKey.generate_one_time_key!
88
set :rails_env, 'production'

config/deploy/uat.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Deploys to all UAT nodes
2-
31
set :bundle_without, %w[test development deployment].join(' ')
42

53
server 'earthworks-uat-a.stanford.edu', user: 'geostaff', roles: %w[web db app]

config/schedule.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,35 @@
2323

2424
# Disable GeoMonitor jobs until v4.x compatibility is resolved
2525
# https://github.com/geoblacklight/geo_monitor/issues/12
26-
# every 1.day, at: '9:34pm', roles: %i[whenevs] do
26+
# every 1.day, at: '9:34pm', roles: %i[cron] do
2727
# rake 'earthworks:geomonitor:update'
2828
# end
2929

30-
# every 1.day, at: ['1:13 am', '7:42 am', '1:13 pm', '7:42 pm'], roles: %i[whenevs] do
30+
# every 1.day, at: ['1:13 am', '7:42 am', '1:13 pm', '7:42 pm'], roles: %i[cron] do
3131
# rake 'earthworks:geomonitor:check_stanford'
3232
# end
3333

34-
# every 2.days, at: ['2:21 am'], roles: %i[whenevs] do
34+
# every 2.days, at: ['2:21 am'], roles: %i[cron] do
3535
# rake 'earthworks:geomonitor:check_public'
3636
# end
3737

3838
every '0 3 * * *', roles: %i[app] do # daily at 3 am
3939
rake 'earthworks:clear_rack_attack_cache'
4040
end
4141

42-
every 1.day, at: '1:04 am', roles: %i[whenevs] do
42+
every 1.day, at: '1:04 am', roles: %i[cron] do
4343
rake 'rake earthworks:clear_download_cache_stale_files'
4444
end
4545

46-
every 1.day, at: '3:04 am', roles: %i[whenevs] do
46+
every 1.day, at: '3:04 am', roles: %i[cron] do
4747
rake 'rake earthworks:prune_old_guest_user_data[3]'
4848
end
4949

50-
every 1.day, at: '4:04 am', roles: %i[whenevs] do
50+
every 1.day, at: '4:04 am', roles: %i[cron] do
5151
rake 'rake earthworks:prune_old_search_data[14]'
5252
end
5353

54-
every :tuesday, at: '5:04 am', roles: %i[whenevs] do
54+
every :tuesday, at: '5:04 am', roles: %i[cron] do
5555
rake 'rake earthworks:opengeometadata:pull'
5656
rake 'rake earthworks:opengeometadata:index'
5757
end

0 commit comments

Comments
 (0)