debian-mirror-gitlab/app/workers/remove_expired_members_worker.rb
2016-11-03 12:29:30 +05:30

14 lines
340 B
Ruby

class RemoveExpiredMembersWorker
include Sidekiq::Worker
include CronjobQueue
def perform
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