BigW Consortium Gitlab

remove_expired_members_worker.rb 317 Bytes
Newer Older
1 2 3 4
class RemoveExpiredMembersWorker
  include Sidekiq::Worker

  def perform
5
    Member.expired.find_each do |member|
6
      begin
7
        Members::AuthorizedDestroyService.new(member).execute
8 9 10 11 12 13
      rescue => ex
        logger.error("Expired Member ID=#{member.id} cannot be removed - #{ex}")
      end
    end
  end
end