Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 13 additions & 7 deletions hermes_cli/kanban.py
Original file line number Diff line number Diff line change
Expand Up @@ -1894,13 +1894,19 @@ def _cmd_complete(args: argparse.Namespace) -> int:
failed: list[str] = []
with kb.connect_closing() as conn:
for tid in ids:
if not kb.complete_task(
conn, tid,
result=args.result,
summary=summary,
metadata=metadata,
expected_run_id=_worker_run_id_for(tid),
):
try:
ok = kb.complete_task(
conn, tid,
result=args.result,
summary=summary,
metadata=metadata,
expected_run_id=_worker_run_id_for(tid),
)
except (kb.CompletionGateError, kb.InvalidOptOutError) as gate_err:
failed.append(tid)
print(f"{tid}: {gate_err}", file=sys.stderr)
continue
if not ok:
failed.append(tid)
print(f"cannot complete {tid} (unknown id or terminal state)", file=sys.stderr)
else:
Expand Down
Loading