gitlab-org--gitlab-foss/app/services/clusters/applications/create_service.rb

19 lines
460 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Clusters
module Applications
class CreateService < Clusters::Applications::BaseService
private
def worker_class(application)
application.updateable? ? ClusterUpgradeAppWorker : ClusterInstallAppWorker
end
def builder
cluster.method("application_#{application_name}").call ||
cluster.method("build_application_#{application_name}").call
end
end
end
end