summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-08-16 14:46:40 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2018-08-16 17:29:37 +0200
commit9606dbbb033567de9831a8cdea0e56236e7d2eb2 (patch)
treea83e2103a7f3ab31836375f1adbef605f050f0f8 /app/workers
parent96ce2da74ee36e88f20cbd7ceaff2ab49f0bb223 (diff)
downloadgitlab-ce-9606dbbb033567de9831a8cdea0e56236e7d2eb2.tar.gz
Whitelist existing destroy_all offensesblacklist-destroy-all
This whitelists all existing places where we use "destroy_all".
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/remove_expired_group_links_worker.rb2
-rw-r--r--app/workers/remove_old_web_hook_logs_worker.rb2
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