2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 13:09:10 -05:00
|
|
|
class ClusterInstallAppWorker # rubocop:disable Scalability/IdempotentWorker
|
2017-11-28 11:08:30 -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
|
2017-11-02 06:14:10 -04:00
|
|
|
include ClusterQueue
|
2017-11-02 13:55:02 -04:00
|
|
|
include ClusterApplications
|
2017-11-02 06:14:10 -04:00
|
|
|
|
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
|
|
|
|
2017-11-02 06:14:10 -04:00
|
|
|
def perform(app_name, app_id)
|
2017-11-02 13:55:02 -04:00
|
|
|
find_application(app_name, app_id) do |app|
|
|
|
|
Clusters::Applications::InstallService.new(app).execute
|
2017-11-02 06:14:10 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|