debian-mirror-gitlab/app/workers/project_destroy_worker.rb
2016-06-02 11:05:42 +05:30

17 lines
361 B
Ruby

class ProjectDestroyWorker
include Sidekiq::Worker
sidekiq_options queue: :default
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).execute
end
end