Skip to content

Commit

Permalink
fix(mysql): dbha api增加集群filter #8472
Browse files Browse the repository at this point in the history
  • Loading branch information
xfwduke authored and zhangzhw8 committed Dec 9, 2024
1 parent 41f471c commit 9c87d81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dbm-ui/backend/db_meta/flatten/storage_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from collections import defaultdict
from typing import Dict, List

from django.db.models import QuerySet
from django.db.models import F, QuerySet

from backend.db_meta.enums import ClusterEntryType, ClusterPhase
from backend.db_meta.enums.extra_process_type import ExtraProcessType
Expand Down Expand Up @@ -67,7 +67,7 @@ def storage_instance(storages: QuerySet) -> List[Dict]:
}

receiver = []
for e in ins.as_ejector.all():
for e in ins.as_ejector.filter(receiver__cluster=F("ejector__cluster")):
rinfo = {
"ip": e.receiver.machine.ip,
"port": e.receiver.port,
Expand All @@ -78,7 +78,7 @@ def storage_instance(storages: QuerySet) -> List[Dict]:
info["receiver"] = receiver

ejector = []
for r in ins.as_receiver.all():
for r in ins.as_receiver.filter(ejector__cluster=F("receiver__cluster")):
einfo = {
"ip": r.ejector.machine.ip,
"port": r.ejector.port,
Expand Down

0 comments on commit 9c87d81

Please sign in to comment.