2020-12-04 18:09:55 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Environments
|
|
|
|
module CanaryIngress
|
|
|
|
class UpdateWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
sidekiq_options retry: false
|
|
|
|
idempotent!
|
|
|
|
worker_has_external_dependencies!
|
|
|
|
feature_category :continuous_delivery
|
2021-05-03 09:10:02 +00:00
|
|
|
tags :exclude_from_kubernetes
|
2020-12-04 18:09:55 +00:00
|
|
|
|
|
|
|
def perform(environment_id, params)
|
|
|
|
Environment.find_by_id(environment_id).try do |environment|
|
|
|
|
Environments::CanaryIngress::UpdateService
|
|
|
|
.new(environment.project, nil, params.with_indifferent_access)
|
|
|
|
.execute(environment)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|