2021-01-29 00:20:46 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class DestroyPagesDeploymentsWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
data_consistency :always
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
idempotent!
|
|
|
|
|
|
|
|
loggable_arguments 0, 1
|
|
|
|
sidekiq_options retry: 3
|
|
|
|
feature_category :pages
|
2021-06-08 01:23:25 +05:30
|
|
|
tags :exclude_from_kubernetes
|
2021-01-29 00:20:46 +05:30
|
|
|
|
|
|
|
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
|