2019-04-10 02:50:14 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Clusters
|
|
|
|
module Applications
|
2020-02-19 18:09:10 +00:00
|
|
|
class WaitForUninstallAppWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-04-10 02:50:14 +00:00
|
|
|
include ApplicationWorker
|
|
|
|
include ClusterQueue
|
|
|
|
include ClusterApplications
|
|
|
|
|
|
|
|
INTERVAL = 10.seconds
|
|
|
|
TIMEOUT = 20.minutes
|
|
|
|
|
2019-10-30 15:14:17 +00:00
|
|
|
worker_has_external_dependencies!
|
|
|
|
worker_resource_boundary :cpu
|
|
|
|
|
2019-04-10 02:50:14 +00:00
|
|
|
def perform(app_name, app_id)
|
|
|
|
find_application(app_name, app_id) do |app|
|
|
|
|
Clusters::Applications::CheckUninstallProgressService.new(app).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|