diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/workers/remove_expired_group_links_worker.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/workers/remove_expired_group_links_worker.rb')
-rw-r--r-- | app/workers/remove_expired_group_links_worker.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/workers/remove_expired_group_links_worker.rb b/app/workers/remove_expired_group_links_worker.rb index 8226f22837c..3f1a484f384 100644 --- a/app/workers/remove_expired_group_links_worker.rb +++ b/app/workers/remove_expired_group_links_worker.rb @@ -7,10 +7,12 @@ class RemoveExpiredGroupLinksWorker # rubocop:disable Scalability/IdempotentWork feature_category :authentication_and_authorization def perform - ProjectGroupLink.expired.destroy_all # rubocop: disable DestroyAll + ProjectGroupLink.expired.find_each do |link| + Projects::GroupLinks::DestroyService.new(link.project, nil).execute(link) + end GroupGroupLink.expired.find_in_batches do |link_batch| - Groups::GroupLinks::DestroyService.new(nil, nil).execute(link_batch) + Groups::GroupLinks::DestroyService.new(nil, nil).execute(link_batch, skip_authorization: true) end end end |