From 1f436104f3bd78828168e32c2e2463dbb5ce92c1 Mon Sep 17 00:00:00 2001 From: Wolf Date: Wed, 23 Sep 2026 12:22:15 +0200 Subject: [PATCH] Print what each task's jobs did, not only how they ended roledesk job embed and job score reported the final job's tally, which says a job finished but not how many roles it embedded or scored. Co-Authored-By: Claude Opus 5.5 --- roledesk/cli.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/roledesk/cli.py b/roledesk/cli.py index 809f860..604b2c2 100644 --- a/roledesk/cli.py +++ b/roledesk/cli.py @@ -93,10 +93,17 @@ def run_job(args: argparse.Namespace) -> int: started = queue.jobs.of_task(task_id) if not started: return 0 - finals = [j for j in queue.jobs.of_cascade(started[0].cascade_id) if j.kind == FINAL] + cascade = queue.jobs.of_cascade(started[0].cascade_id) + finals = [j for j in cascade if j.kind == FINAL] for final in finals: + # A task's own jobs say what the work did; the final job only + # tallies how they ended. Up to five, so a pull of twenty board + # batches stays one readable line. + work = [j.result for j in cascade if j.task_id == final.task_id + and j.kind != FINAL][:5] print(json.dumps({"id": final.id, "state": final.state, - "result": final.result, "error": final.error})) + "result": final.result, "work": work, + "error": final.error})) return 0 if all(f.state == "done" for f in finals) else 1 queued = queue.enqueue(args.kind) queue.drain()