debian-mirror-gitlab/app/workers/group_destroy_worker.rb
2018-03-17 18:26:18 +05:30

17 lines
316 B
Ruby

class GroupDestroyWorker
include ApplicationWorker
include ExceptionBacktrace
def perform(group_id, user_id)
begin
group = Group.find(group_id)
rescue ActiveRecord::RecordNotFound
return
end
user = User.find(user_id)
Groups::DestroyService.new(group, user).execute
end
end