2018-11-02 11:46:15 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-12-21 08:17:13 -05:00
|
|
|
class ClusterConfigureWorker
|
2018-11-02 11:46:15 -04:00
|
|
|
include ApplicationWorker
|
|
|
|
include ClusterQueue
|
|
|
|
|
|
|
|
def perform(cluster_id)
|
2019-05-02 21:05:53 -04:00
|
|
|
Clusters::Cluster.managed.find_by_id(cluster_id).try do |cluster|
|
2019-04-10 23:26:10 -04:00
|
|
|
if cluster.project_type?
|
2019-04-14 22:11:50 -04:00
|
|
|
Clusters::RefreshService.create_or_update_namespaces_for_cluster(cluster)
|
|
|
|
end
|
2018-11-02 11:46:15 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|