Description
Get task status
Usage
To get the status of tasks, you need to run the following command:
sama task status [flags]
Flags
--batch-id strings filter deliveries by batch id. Comma separated values are supported.
--client-batch-id strings filter deliveries by client batch id. Comma separated values are supported.
--from string filter deliveries by tasks delivered starting from timestamp.
-h, --help help for deliver
-o, --output-file string destination file to write the delivery results.
--task-id strings get delivery by specific task id. Comma separated values are supported.
Examples
Get status of tasks
$ sama task status
Output:
batch,client_batch,id,state
52973,road2,630e1c15bff10d0096501175,in progress
252973,road1,630e1c15bff10d0096501174,new
252973,road1,630e1c15bff10d0096501173,new
252973,road1,630e1c15bff10d0096501172,new
Enter q to quit; n for next page; p for previous; or a valid integer to navigate to that page:
Get status of tasks and display input values
$ sama task status --input name
Output:
batch,client_batch,id,state,name
252970,highway 42,630e1c15bff10d0096501110,in progress,scene_12_2334
252970,highway 42,630e1c15bff10d0096501111,in progress,scene_12_2335
Enter q to quit; n for next page; p for previous; or a valid integer to navigate to that page:
Get status of tasks filtered by batch id
$ sama task status --batch-id 252973
Output:
batch,client_batch,id,state
252973,road1,630e1c15bff10d0096501174,new
252973,road1,630e1c15bff10d0096501173,new
252973,road1,630e1c15bff10d0096501172,new
Enter q to quit; n for next page; p for previous; or a valid integer to navigate to that page:
Get status of tasks filtered by client batch id
$ sama task status --client-batch-id "highway 15"
Output:
batch,client_batch,id,state
252970,highway 15,630e1c15bff10d0096501100,new
252970,highway 15,630e1c15bff10d0096501101,new
Enter q to quit; n for next page; p for previous; or a valid integer to navigate to that page:
Get status of tasks filtered by task state
state can be: new, in progress, completed, approved, delivered, acknowledged, rejected
$ sama task status --client-batch-id "in progress"
Output:
batch,client_batch,id,state
252970,highway 42,630e1c15bff10d0096501110,in progress
252970,highway 42,630e1c15bff10d0096501111,in progress
Enter q to quit; n for next page; p for previous; or a valid integer to navigate to that page:
Get status of tasks filtered by task ids
$ sama task status --task-id 630e1c15bff10d0096501110,630e1c15bff10d0096501113
Output:
batch,client_batch,id,state
252970,highway 42,630e1c15bff10d0096501110,in progress
252970,highway 42,630e1c15bff10d0096501113,in progress
Enter q to quit; n for next page; p for previous; or a valid integer to navigate to that page:
Get status of tasks and output detailed results to stdout
$ sama task status --stdout
Output:
[
{
"id": "629f61004c5f7909ae5b88bd",
"project_id": 7536,
"created_at": "2022-06-07T14:30:27.603Z",
"priority": 0,
"state": "acknowledged",
"data": {
"client batch id": "road1",
"name": "xyz123",
"url": "http://s3.bucket.com/234.jpg"
},
"answers": {
"Park": {
"park": "0"
},
"myimage": {}
},
"batch_id": 167045,
"client_batch_id": "road1",
"task_url": "https://app.sama.com/projects/7536/tasks/629f61004c5f7909ae5b88bd"
}
]
Get status of tasks and output detailed results to file
$ sama task status --output-file myfile.json