debian-mirror-gitlab/app/workers/project_destroy_worker.rb

18 lines
352 B
Ruby
Raw Normal View History

2016-04-02 18:10:28 +05:30
class ProjectDestroyWorker
include Sidekiq::Worker
sidekiq_options queue: :default
def perform(project_id, user_id, params)
begin
project = Project.find(project_id)
rescue ActiveRecord::RecordNotFound
return
end
user = User.find(user_id)
::Projects::DestroyService.new(project, user, params).execute
end
end