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

Method get

django_q/status.py:81–97  ·  view source on GitHub ↗

gets the current status for the cluster :param pid: :param broker: an optional broker instance :param cluster_id: id of the cluster :return: Stat or Status

(pid: int, cluster_id: str, broker: Broker = None)

Source from the content-addressed store, hash-verified

79
80 @staticmethod
81 def get(pid: int, cluster_id: str, broker: Broker = None) -> Union[Status, None]:
82 """
83 gets the current status for the cluster
84 :param pid:
85 :param broker: an optional broker instance
86 :param cluster_id: id of the cluster
87 :return: Stat or Status
88 """
89 if not broker:
90 broker = get_broker()
91 pack = broker.get_stat(Stat.get_key(cluster_id))
92 if pack:
93 try:
94 return SignedPackage.loads(pack)
95 except BadSignature:
96 return None
97 return Status(pid=pid, cluster_id=cluster_id)
98
99 @staticmethod
100 def get_all(broker: Broker = None) -> list:

Callers 15

get_resultMethod · 0.45
get_taskMethod · 0.45
successMethod · 0.45
last_runMethod · 0.45
async_taskFunction · 0.45
result_cachedFunction · 0.45
result_group_cachedFunction · 0.45
fetch_cachedFunction · 0.45
fetch_group_cachedFunction · 0.45
count_group_cachedFunction · 0.45
delete_group_cachedFunction · 0.45
async_iterFunction · 0.45

Calls 5

get_brokerFunction · 0.90
StatusClass · 0.85
get_keyMethod · 0.80
get_statMethod · 0.45
loadsMethod · 0.45

Tested by 8

test_schedulerFunction · 0.36
test_monitorFunction · 0.36
test_admin_viewsFunction · 0.36
test_bad_secretFunction · 0.36
test_attempt_countFunction · 0.36
test_update_failedFunction · 0.36
acknowledgeMethod · 0.36