2016-01-22 14:13:37 -05:00
|
|
|
class ProjectDestroyWorker
|
|
|
|
include Sidekiq::Worker
|
|
|
|
|
|
|
|
sidekiq_options queue: :default
|
|
|
|
|
|
|
|
def perform(project_id, user_id, params)
|
|
|
|
begin
|
2016-03-29 10:57:24 -04:00
|
|
|
project = Project.unscoped.find(project_id)
|
2016-01-22 14:13:37 -05:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
user = User.find(user_id)
|
|
|
|
|
|
|
|
::Projects::DestroyService.new(project, user, params).execute
|
|
|
|
end
|
|
|
|
end
|