2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ClusterConfigureWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
include ClusterQueue
|
|
|
|
|
|
|
|
def perform(cluster_id)
|
|
|
|
Clusters::Cluster.find_by_id(cluster_id).try do |cluster|
|
2019-05-18 00:54:41 +05:30
|
|
|
if cluster.project_type? || Feature.disabled?(:ci_preparing_state, default_enabled: true)
|
|
|
|
Clusters::RefreshService.create_or_update_namespaces_for_cluster(cluster)
|
|
|
|
end
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|