BatchJob
Batch job.
Source code in hume/_batch/batch_job.py
__init__(client, job_id)
Construct a BatchJob.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
HumeBatchClient
|
HumeBatchClient instance. |
required |
job_id |
str
|
Job ID. |
required |
__repr__()
Get the string representation of the BatchJob
.
Returns:
Type | Description |
---|---|
str
|
The the string representation of the |
await_complete(timeout=300)
Block until the job has reached a terminal status.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timeout |
int
|
Maximum time in seconds to await. If the timeout is reached
before the job reaches a terminal state the job will continue to be processed,
but a |
300
|
Raises:
Type | Description |
---|---|
ValueError
|
If the timeout is not valid. |
Returns:
Name | Type | Description |
---|---|---|
BatchJobResult |
BatchJobResult
|
The result of the |
Source code in hume/_batch/batch_job.py
get_result()
Get the result of the BatchJob.
Note that the result of a job may be fetched before the job has completed.
You may want to use job.await_complete()
which will wait for the job to
reach a terminal state before returning the result.
Returns:
Name | Type | Description |
---|---|---|
BatchJobResult |
BatchJobResult
|
The result of the |
Source code in hume/_batch/batch_job.py
get_status()
Get the status of the job.
Returns:
Name | Type | Description |
---|---|---|
BatchJobStatus |
BatchJobStatus
|
The status of the |