2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Clusters
|
|
|
|
module Applications
|
2019-05-18 00:54:41 +05:30
|
|
|
class CreateService < Clusters::Applications::BaseService
|
2018-12-13 13:39:08 +05:30
|
|
|
private
|
|
|
|
|
2019-05-18 00:54:41 +05:30
|
|
|
def worker_class(application)
|
|
|
|
application.updateable? ? ClusterUpgradeAppWorker : ClusterInstallAppWorker
|
2018-12-13 13:39:08 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def builder
|
2019-05-18 00:54:41 +05:30
|
|
|
cluster.method("application_#{application_name}").call ||
|
|
|
|
cluster.method("build_application_#{application_name}").call
|
2018-12-13 13:39:08 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|