Skip to content

Commit 8b6bd03

Browse files
committed
add jobs subcommand
1 parent fecc19d commit 8b6bd03

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/bma_cli.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ def fileinfo(file_uuid: uuid.UUID) -> None:
6464
click.echo(json.dumps(info))
6565

6666

67+
@app.command()
68+
def jobs() -> None:
69+
"""Get info on assigned jobs."""
70+
client, config = init()
71+
jobs = client.get_jobs(job_filter=f"?limit=0&finished=false&client_uuid={client.uuid}")
72+
click.echo(json.dumps(jobs))
73+
click.echo(f"Total {len(jobs)} unfinished jobs assigned to this client.")
74+
75+
76+
6777
@app.command()
6878
def download(file_uuid: uuid.UUID) -> None:
6979
"""Download a file."""

0 commit comments

Comments
 (0)