BigW Consortium Gitlab

group_destroy_worker.rb 316 Bytes
Newer Older
1
class GroupDestroyWorker
2
  include ApplicationWorker
3
  include ExceptionBacktrace
4 5 6

  def perform(group_id, user_id)
    begin
7
      group = Group.find(group_id)
8 9 10 11 12 13
    rescue ActiveRecord::RecordNotFound
      return
    end

    user = User.find(user_id)

14
    Groups::DestroyService.new(group, user).execute
15 16
  end
end