gitlab-org--gitlab-foss/app/workers/remove_expired_members_worker.rb

15 lines
342 B
Ruby
Raw Normal View History

class RemoveExpiredMembersWorker
include ApplicationWorker
include CronjobQueue
def perform
2016-08-09 12:39:13 -04:00
Member.expired.find_each do |member|
begin
Members::AuthorizedDestroyService.new(member).execute
rescue => ex
logger.error("Expired Member ID=#{member.id} cannot be removed - #{ex}")
end
end
end
end