diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-06-26 19:24:42 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-07-02 13:48:57 +0300 |
commit | 75316348c50d03d9aed760e9b603275995e4e3e3 (patch) | |
tree | 3eeaebf24fceb6d378063f592682ace0b35533d6 /config | |
parent | f25cdea64d69a97f31719622f9dead3de1ea0e11 (diff) |
Prune web hook logs older than 90 days
This adds a recurring Sidekiq job that removes up to 50 000 old web hook
logs per hour, if they are older than 90 days. This will prevent the
web_hook_logs table from growing indefinitely.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/46120
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 550647ae1c6..693a2934a1b 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -338,6 +338,10 @@ Settings.cron_jobs['issue_due_scheduler_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['issue_due_scheduler_worker']['cron'] ||= '50 00 * * *' Settings.cron_jobs['issue_due_scheduler_worker']['job_class'] = 'IssueDueSchedulerWorker' +Settings.cron_jobs['prune_web_hook_logs_worker'] ||= Settingslogic.new({}) +Settings.cron_jobs['prune_web_hook_logs_worker']['cron'] ||= '0 */1 * * *' +Settings.cron_jobs['prune_web_hook_logs_worker']['job_class'] = 'PruneWebHookLogsWorker' + # # Sidekiq # |