debian-mirror-gitlab/app/workers/destroy_pages_deployments_worker.rb
2021-06-08 01:23:25 +05:30

20 lines
438 B
Ruby

# frozen_string_literal: true
class DestroyPagesDeploymentsWorker
include ApplicationWorker
idempotent!
loggable_arguments 0, 1
sidekiq_options retry: 3
feature_category :pages
tags :exclude_from_kubernetes
def perform(project_id, last_deployment_id = nil)
project = Project.find_by_id(project_id)
return unless project
::Pages::DestroyDeploymentsService.new(project, last_deployment_id).execute
end
end