diff options
author | Robert Speicher <robert@gitlab.com> | 2018-08-17 17:10:12 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-08-17 17:10:12 +0000 |
commit | 120ce02e5e7e72654cb42edddc25ff3b057ec136 (patch) | |
tree | dc612e487ea3d84cc7848ff5cb74660a3d79bf5a /app/workers | |
parent | a58d0a0182d06efbbde57821e71c305518325d6f (diff) | |
parent | 9606dbbb033567de9831a8cdea0e56236e7d2eb2 (diff) | |
download | gitlab-ce-120ce02e5e7e72654cb42edddc25ff3b057ec136.tar.gz |
Merge branch 'blacklist-destroy-all' into 'master'
Blacklist the use of destroy_all
See merge request gitlab-org/gitlab-ce!21250
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/remove_expired_group_links_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/remove_old_web_hook_logs_worker.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/remove_expired_group_links_worker.rb b/app/workers/remove_expired_group_links_worker.rb index 6b8b972a440..25128caf72f 100644 --- a/app/workers/remove_expired_group_links_worker.rb +++ b/app/workers/remove_expired_group_links_worker.rb @@ -5,6 +5,6 @@ class RemoveExpiredGroupLinksWorker include CronjobQueue def perform - ProjectGroupLink.expired.destroy_all + ProjectGroupLink.expired.destroy_all # rubocop: disable DestroyAll end end diff --git a/app/workers/remove_old_web_hook_logs_worker.rb b/app/workers/remove_old_web_hook_logs_worker.rb index 17140ac4450..0f486f8991d 100644 --- a/app/workers/remove_old_web_hook_logs_worker.rb +++ b/app/workers/remove_old_web_hook_logs_worker.rb @@ -6,7 +6,9 @@ class RemoveOldWebHookLogsWorker WEB_HOOK_LOG_LIFETIME = 2.days + # rubocop: disable DestroyAll def perform WebHookLog.destroy_all(['created_at < ?', Time.now - WEB_HOOK_LOG_LIFETIME]) end + # rubocop: enable DestroyAll end |