Class: ProjectDestroyWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/project_destroy_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(project_id, user_id, params) ⇒ Object


6
7
8
9
10
11
12
13
14
15
16
# File 'app/workers/project_destroy_worker.rb', line 6

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