MCPcopy
hub / github.com/shareAI-lab/learn-claude-code / can_start

Function can_start

s12_task_system/code.py:99–108  ·  view source on GitHub ↗

Check if all blockedBy dependencies are completed. Missing dependencies are treated as blocked.

(task_id: str)

Source from the content-addressed store, hash-verified

97
98
99def can_start(task_id: str) -> bool:
100 """Check if all blockedBy dependencies are completed.
101 Missing dependencies are treated as blocked."""
102 task = load_task(task_id)
103 for dep_id in task.blockedBy:
104 if not _task_path(dep_id).exists():
105 return False
106 if load_task(dep_id).status != "completed":
107 return False
108 return True
109
110
111def claim_task(task_id: str, owner: str = "agent") -> str:

Callers 2

claim_taskFunction · 0.70
complete_taskFunction · 0.70

Calls 3

existsMethod · 0.80
load_taskFunction · 0.70
_task_pathFunction · 0.70

Tested by

no test coverage detected