2018-10-09 23:47:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Clusters
|
|
|
|
module Applications
|
2019-02-18 12:06:51 -05:00
|
|
|
class CreateService < Clusters::Applications::BaseService
|
2018-10-09 23:47:27 -04:00
|
|
|
private
|
|
|
|
|
2019-02-18 12:06:51 -05:00
|
|
|
def worker_class(application)
|
|
|
|
application.updateable? ? ClusterUpgradeAppWorker : ClusterInstallAppWorker
|
2018-10-09 23:47:27 -04:00
|
|
|
end
|
|
|
|
|
2019-04-01 09:32:20 -04:00
|
|
|
def builder
|
|
|
|
cluster.method("application_#{application_name}").call ||
|
|
|
|
cluster.method("build_application_#{application_name}").call
|
2018-10-09 23:47:27 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|