Get the status for all currently running clusters with the same prefix and secret key. :return: list of type Stat
(broker: Broker = None)
| 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 |