BatchJobDetails
Batch job details.
Source code in hume/_batch/batch_job_details.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
__init__(*, configs, urls, files, state, callback_url=None, notify=False)
Construct a BatchJobDetails.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
configs |
Dict[ModelType, ModelConfigBase]
|
Configurations for the |
required |
urls |
List[str]
|
URLs processed in the |
required |
files |
List[str]
|
Files processed in the |
required |
state |
BatchJobState
|
State of |
required |
callback_url |
Optional[str]
|
A URL to which a POST request is sent upon job completion. |
None
|
notify |
bool
|
Whether an email notification should be sent upon job completion. |
False
|
Source code in hume/_batch/batch_job_details.py
from_response(response)
classmethod
Construct a BatchJobDetails
from a batch API job response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response |
Any
|
Batch API job response. |
required |
Returns:
Name | Type | Description |
---|---|---|
BatchJobDetails |
BatchJobDetails
|
A |
Source code in hume/_batch/batch_job_details.py
get_created_time()
Get the time the job was created.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
Optional[datetime]: Datetime when the job was created. If the job has not started
then |
Source code in hume/_batch/batch_job_details.py
get_ended_time()
Get the time the job stopped running if the job is in a terminal state.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
Optional[datetime]: Datetime when the job started running. If the job is not in a terminal
state then |
Source code in hume/_batch/batch_job_details.py
get_run_time_ms()
Get the total time in milliseconds it took for the job to run if the job is in a terminal state.
Returns:
Type | Description |
---|---|
Optional[int]
|
Optional[int]: Time in milliseconds it took for the job to run. If the job is not in a terminal
state then |
Source code in hume/_batch/batch_job_details.py
get_started_time()
Get the time the job started running.
Returns:
Type | Description |
---|---|
Optional[datetime]
|
Optional[datetime]: Datetime when the job started running. If the job has not started
then |
Source code in hume/_batch/batch_job_details.py
get_status()
Get the status of the job.
Returns:
Name | Type | Description |
---|---|---|
BatchJobStatus |
BatchJobStatus
|
The status of the |