2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ClusterConfigureWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
include ClusterQueue
|
|
|
|
|
|
|
|
def perform(cluster_id)
|
2019-07-31 22:56:46 +05:30
|
|
|
Clusters::Cluster.managed.find_by_id(cluster_id).try do |cluster|
|
2019-09-04 21:01:54 +05:30
|
|
|
if cluster.project_type?
|
2019-07-07 11:18:12 +05:30
|
|
|
Clusters::RefreshService.create_or_update_namespaces_for_cluster(cluster)
|
|
|
|
end
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|