+
+ updated_cluster_list = []
+ if k8sclustertype == "chart" and cluster_uuid not in updated_cluster_list:
+ del_repo_list, added_repo_dict = await asyncio.ensure_future(
+ self.k8sclusterhelm.synchronize_repos(cluster_uuid=cluster_uuid))
+ if del_repo_list or added_repo_dict:
+ unset = {'_admin.helm_charts_added.' + item: None for item in del_repo_list}
+ updated = {'_admin.helm_charts_added.' +
+ item: name for item, name in added_repo_dict.items()}
+ self.logger.debug("repos synchronized, to_delete: {}, to_add: {}".
+ format(del_repo_list, added_repo_dict))
+ self.db.set_one("k8sclusters", {"_id": kdur["k8s-cluster"]["id"]},
+ updated, unset=unset)
+ updated_cluster_list.append(cluster_uuid)
+