2019-02-07 16:40:55 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 13:09:10 -05:00
|
|
|
class ClusterUpgradeAppWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-02-07 16:40:55 -05:00
|
|
|
include ApplicationWorker
|
2021-04-30 14:10:09 -04:00
|
|
|
|
2021-07-21 08:09:35 -04:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 14:10:09 -04:00
|
|
|
sidekiq_options retry: 3
|
2019-02-07 16:40:55 -05:00
|
|
|
include ClusterQueue
|
|
|
|
include ClusterApplications
|
|
|
|
|
2019-10-30 11:14:17 -04:00
|
|
|
worker_has_external_dependencies!
|
2020-06-12 08:08:56 -04:00
|
|
|
loggable_arguments 0
|
2019-10-30 11:14:17 -04:00
|
|
|
|
2019-02-07 16:40:55 -05:00
|
|
|
def perform(app_name, app_id)
|
|
|
|
find_application(app_name, app_id) do |app|
|
|
|
|
Clusters::Applications::UpgradeService.new(app).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|