summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorOlaf Tomalka <olaf.tomalka@gmail.com>2016-09-05 10:18:08 +0200
committerOlaf Tomalka <olaf.tomalka@gmail.com>2016-09-07 19:41:25 +0200
commite25b48ffcf1f7ef31df8d6c3366674e7f5c29893 (patch)
tree89e6864c451bfd3ebf68af14d12743304968cbc3 /config
parent6690fc70478b4d82c49689e9e13e414bc77bb271 (diff)
downloadgitlab-ce-e25b48ffcf1f7ef31df8d6c3366674e7f5c29893.tar.gz
Added cron to prune events older than 12 months.
Since contribution calendar shows only 12 months of activity, events older than that time are not visible anywhere and can be safely pruned saving big amount of database storage. Fixes #21164
Diffstat (limited to 'config')
-rw-r--r--config/initializers/1_settings.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 4a01b9e40fb..2fac3e34dc5 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -299,6 +299,9 @@ Settings.cron_jobs['remove_expired_members_worker']['job_class'] = 'RemoveExpire
Settings.cron_jobs['remove_expired_group_links_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['remove_expired_group_links_worker']['cron'] ||= '10 0 * * *'
Settings.cron_jobs['remove_expired_group_links_worker']['job_class'] = 'RemoveExpiredGroupLinksWorker'
+Settings.cron_jobs['prune_old_events_worker'] ||= Settingslogic.new({})
+Settings.cron_jobs['prune_old_events_worker']['cron'] ||= '0 0 * * *'
+Settings.cron_jobs['prune_old_events_worker']['job_class'] = 'PruneOldEventsWorker'
#
# GitLab Shell