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

16 lines
373 B
Ruby

class ProjectDestroyWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
def perform(project_id, user_id, params)
begin
project = Project.unscoped.find(project_id)
rescue ActiveRecord::RecordNotFound
return
end
user = User.find(user_id)
::Projects::DestroyService.new(project, user, params.symbolize_keys).execute
end
end