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
8 changes: 6 additions & 2 deletions samples/list_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,14 @@ def _wait_for_job(server, job_id, timeout):
raise SystemExit(2)
except JobFailedException as exc:
# The exception carries the failed JobItem so callers can inspect it.
print(f"Job {job_id} failed: notes={exc.job.notes}")
# `notes` is the legacy list[str] surface; `status_notes` is the structured
# list[dict] shape emitted for modern job types (see JobItem docstring).
print(f"Job {job_id} failed: notes={exc.job.notes} status_notes={exc.job.status_notes}")
raise SystemExit(1) from exc

print(f"Job {job_id} finished. finish_code={job.finish_code} notes={job.notes}")
print(
f"Job {job_id} finished. finish_code={job.finish_code}" f" notes={job.notes} status_notes={job.status_notes}"
)


if __name__ == "__main__":
Expand Down
Loading