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

17 lines
373 B
Ruby
Raw Normal View History

2016-04-02 18:10:28 +05:30
class ProjectDestroyWorker
include Sidekiq::Worker
2016-11-03 12:29:30 +05:30
include DedicatedSidekiqQueue
2016-04-02 18:10:28 +05:30
def perform(project_id, user_id, params)
begin
2016-06-02 11:05:42 +05:30
project = Project.unscoped.find(project_id)
2016-04-02 18:10:28 +05:30
rescue ActiveRecord::RecordNotFound
return
end
user = User.find(user_id)
2016-09-13 17:45:13 +05:30
::Projects::DestroyService.new(project, user, params.symbolize_keys).execute
2016-04-02 18:10:28 +05:30
end
end