Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions agents/s07_task_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ def update(self, task_id: int, status: str = None,
self._clear_dependency(task_id)
if add_blocked_by:
task["blockedBy"] = list(set(task["blockedBy"] + add_blocked_by))
# Bidirectional: also update the blocker tasks' blocks lists
for blocker_id in add_blocked_by:
try:
blocker = self._load(blocker_id)
if task_id not in blocker["blocks"]:
blocker["blocks"].append(task_id)
self._save(blocker)
except ValueError:
pass
if add_blocks:
task["blocks"] = list(set(task["blocks"] + add_blocks))
# Bidirectional: also update the blocked tasks' blockedBy lists
Expand Down