MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / check

Function check

tests/utils/wait.py:53–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 last_table = None
52
53 def check():
54 nonlocal last_table
55 if check_running_processes:
56 env.check_running_processes()
57 table = env.command(commands, as_table=True)
58 last_table = table
59 items = [row[state_index].lower() for row in table if row[0].lstrip("*") in ids]
60 if len(items) < len(ids):
61 return False
62 r = all(s in target_states for s in items)
63 if not r:
64 if all(s in TERMINAL_STATES for s in items):
65 raise Exception(f"Waiting for {target_states} but job(s) are already in terminal states: {items}")
66 return r
67
68 def on_timeout():
69 if last_table is not None:

Callers

nothing calls this directly

Calls 2

commandMethod · 0.80

Tested by

no test coverage detected