BigW Consortium Gitlab

project_destroy_worker.rb 361 Bytes
Newer Older
1 2 3 4 5 6 7
class ProjectDestroyWorker
  include Sidekiq::Worker

  sidekiq_options queue: :default

  def perform(project_id, user_id, params)
    begin
8
      project = Project.unscoped.find(project_id)
9 10 11 12 13 14 15 16 17
    rescue ActiveRecord::RecordNotFound
      return
    end

    user = User.find(user_id)

    ::Projects::DestroyService.new(project, user, params).execute
  end
end