Skip to content

Commit dde06a8

Browse files
committed
Spread maintenance jobs and add regular orphan cleanup tasks
1 parent caf0163 commit dde06a8

1 file changed

Lines changed: 28 additions & 22 deletions

File tree

config/schedule.rb

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@
66
# Explicitly set path to 'current' to avoid hardcoding to timestamped release
77
set :path, "/var/www/rubyapps/uwm-geoblacklight/current"
88

9-
# Harvest thumbnail images for search results
10-
every :sunday, at: "1:00am", roles: [:app] do
11-
rake "gblsci:images:harvest_retry"
12-
end
13-
14-
# Build the sitemap after the weekly metadata refresh.
15-
every :wednesday, at: "8:00am", roles: [:app] do
16-
rake "sitemap:refresh"
17-
end
9+
# Daily maintenance jobs
1810

1911
# Cleans up anonymous user accounts created by search sessions
2012
every :day, at: "1:30am", roles: [:app] do
@@ -26,28 +18,42 @@
2618
rake "blacklight:delete_old_searches[7]"
2719
end
2820

29-
# Updates OpenGeoMetadata, harvests DCAT, converts legacy records, normalizes harvested Aardvark,
30-
# and re-indexes into Solr
31-
every :wednesday, at: "6:00am", roles: [:app] do
32-
rake "uwm:geocombine_pull_and_index"
21+
# Weekly maintenance jobs
22+
23+
# Harvest thumbnail images for search results.
24+
every :sunday, at: "1:00am", roles: [:app] do
25+
rake "gblsci:images:harvest_retry"
3326
end
3427

35-
# Harvest Allmaps IIIF Annotation Data
28+
# Harvest Allmaps IIIF annotation data.
3629
every :sunday, at: "3:00am", roles: [:app] do
3730
rake "blacklight_allmaps:sidecars:harvest:allmaps"
3831
end
3932

40-
every :sunday, at: "6:30am", roles: [:app] do
33+
# Refresh the georeferenced facet after the Sunday Allmaps harvest window.
34+
every :sunday, at: "7:00am", roles: [:app] do
4135
rake "blacklight_allmaps:index:georeferenced_facet"
4236
end
4337

44-
# Purge thumbnail orphans monthly (first of the month at 9:00AM)
45-
every "0 9 1 * *", roles: [:app] do
38+
# Updates OpenGeoMetadata, harvests DCAT, converts legacy records, normalizes harvested Aardvark,
39+
# and re-indexes into Solr.
40+
every :wednesday, at: "4:00am", roles: [:app] do
41+
rake "uwm:geocombine_pull_and_index"
42+
end
43+
44+
# Build the sitemap the day after the weekly metadata refresh.
45+
every :thursday, at: "4:00am", roles: [:app] do
46+
rake "sitemap:refresh"
47+
end
48+
49+
# Monthly maintenance jobs
50+
51+
# Purge thumbnail orphans monthly on the second Monday at 4:00AM.
52+
every "0 4 8-14 * 1", roles: [:app] do
4653
rake "gblsci:images:harvest_purge_orphans"
4754
end
4855

49-
# Run uwm:index:delete_all on the 15th of every month (3:00AM)
50-
# every "0 3 15 * *", roles: [:app] do
51-
# rake "uwm:index:delete_all"
52-
# command "export RAILS_ENV='production' && export OGM_PATH='/var/www/rubyapps/uwm-geoblacklight/shared/tmp/opengeometadata/' && bundle exec rake geocombine:index"
53-
# end
56+
# Purge Allmaps sidecar orphans monthly on the third Tuesday at 4:00AM.
57+
every "0 4 15-21 * 2", roles: [:app] do
58+
rake "blacklight_allmaps:sidecars:purge_orphans"
59+
end

0 commit comments

Comments
 (0)