CLI

The CLI is started as:


tasks-cli APPLICATION [arguments]

Applications:

Provide configuration with --config or LONG_RUNNER_CONFIG:


tasks-cli tasks list --config app.yaml
LONG_RUNNER_CONFIG=app.yaml tasks-cli tasks list

Tasks

Task commands use:


tasks-cli tasks COMMAND [TASK_ID] [options]

List Tasks


tasks-cli tasks list
tasks-cli tasks list --running-status running
tasks-cli tasks list --tc normal
tasks-cli tasks list --task-type-hid ping-task
tasks-cli tasks list --ext-id external-1
tasks-cli tasks list --pipeline-id <PIPELINE_TASK_ID>
tasks-cli tasks list --max 100
tasks-cli tasks list -h

--pipeline-id filters normal tasks by pipeline task id. --max limits the number of tasks fetched. -h prints task age in a human-readable form.

Cancel Tasks


tasks-cli tasks cancel <TASK_ID>
tasks-cli tasks cancel -i task-ids.txt
kubectl get pods | grep something | awk '{print $1}' | tasks-cli tasks cancel -i -

-i and --in read whitespace-separated task ids from a file. Use - to read from stdin.

Rerun Tasks


tasks-cli tasks rerun <TASK_ID>
tasks-cli tasks rerun --in task-ids.txt
tasks-cli tasks rerun -i -

Rerun is for finished normal tasks. It resets the task back to pending.

Show Task Errors


tasks-cli tasks errors <TASK_ID>
tasks-cli tasks errors <TASK_ID> --max 10
tasks-cli tasks errors <TASK_ID> -m 10

errors prints task errors from task result. It accepts only one task id.

Benchmark

Benchmark commands use:


tasks-cli benchmark BENCHMARK REQUESTS [--config app.yaml]

Benchmark types:

Examples:


tasks-cli benchmark task 1000 --config app.yaml
tasks-cli benchmark message 1000