diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-08-04 23:35:28 +0200 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-08-04 23:35:28 +0200 |
commit | 8354810f103a8e82cb5d2b77049b5b3c9b298fa9 (patch) | |
tree | bf41aa04166199a7883e0fea0d5b5f96b240f012 /app/workers | |
parent | b4b51441aa096db9f953eb8e907dd68e75227c62 (diff) | |
download | gitlab-ce-8354810f103a8e82cb5d2b77049b5b3c9b298fa9.tar.gz |
Use Members::AuthorizedDestroyService in RemoveExpiredMembersWorker.
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/remove_expired_members_worker.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/remove_expired_members_worker.rb b/app/workers/remove_expired_members_worker.rb index 30486b9e8a3..027abf50587 100644 --- a/app/workers/remove_expired_members_worker.rb +++ b/app/workers/remove_expired_members_worker.rb @@ -2,9 +2,9 @@ class RemoveExpiredMembersWorker include Sidekiq::Worker def perform - Member.includes(:created_by).where("expires_at <= ?", Time.current).find_each do |member| + Member.where("expires_at <= ?", Time.current).find_each do |member| begin - Members::DestroyService.new(member, member.created_by).execute + Members::AuthorizedDestroyService.new(member).execute rescue => ex logger.error("Expired Member ID=#{member.id} cannot be removed - #{ex}") end |