Skip to content

Commit

Permalink
fix(backend): 优化集群容量状态同步任务 close TencentBlueKing#2680
Browse files Browse the repository at this point in the history
  • Loading branch information
gaohongsong committed Dec 22, 2023
1 parent c75e120 commit cb568d5
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ def query_cluster_capacity(cluster_type):

cluster_cap_bytes = defaultdict(dict)

domains = list(
Cluster.objects.filter(cluster_type=cluster_type).values_list("immute_domain", flat=True).distinct()
) if cluster_type != ClusterType.Influxdb else StorageInstance.objects.filter(
instance_role=InstanceRole.INFLUXDB).values_list(
"machine__ip", flat=True
domains = (
list(Cluster.objects.filter(cluster_type=cluster_type).values_list("immute_domain", flat=True).distinct())
if cluster_type != ClusterType.Influxdb
else StorageInstance.objects.filter(instance_role=InstanceRole.INFLUXDB).values_list("machine__ip", flat=True)
)

used_data = query_cap(cluster_type, "used")
Expand Down

0 comments on commit cb568d5

Please sign in to comment.