debian-mirror-gitlab/app/services/clusters/applications/create_service.rb
2019-05-18 00:54:41 +05:30

18 lines
460 B
Ruby

# 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