MCPcopy
hub / github.com/Koed00/django-q / get_all

Method get_all

django_q/status.py:100–115  ·  view source on GitHub ↗

Get the status for all currently running clusters with the same prefix and secret key. :return: list of type Stat

(broker: Broker = None)

Source from the content-addressed store, hash-verified

98
99 @staticmethod
100 def get_all(broker: Broker = None) -> list:
101 """
102 Get the status for all currently running clusters with the same prefix
103 and secret key.
104 :return: list of type Stat
105 """
106 if not broker:
107 broker = get_broker()
108 stats = []
109 packs = broker.get_stats(f"{Conf.Q_STAT}:*") or []
110 for pack in packs:
111 try:
112 stats.append(SignedPackage.loads(pack))
113 except BadSignature:
114 continue
115 return stats
116
117 def __getstate__(self):
118 # Don't pickle the redis connection

Callers 5

monitorFunction · 0.80
infoFunction · 0.80
memoryFunction · 0.80
get_idsFunction · 0.80
test_bad_secretFunction · 0.80

Calls 4

get_brokerFunction · 0.90
get_statsMethod · 0.45
appendMethod · 0.45
loadsMethod · 0.45

Tested by 1

test_bad_secretFunction · 0.64