File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 87
87
ERROR_PAYLOAD ,
88
88
ERRORS_KEY ,
89
89
JOB_ID_KEY ,
90
- JOB_STATUS_KEY ,
90
+ JOB_LAST_KNOWN_STATUS_KEY ,
91
91
JOB_TYPE_KEY ,
92
92
JOB_CREATION_TIME_KEY ,
93
93
IMAGE_KEY ,
@@ -217,7 +217,7 @@ def list_jobs(
217
217
return [
218
218
AsyncJob (
219
219
job_id = job [JOB_ID_KEY ],
220
- job_last_known_status = job [JOB_STATUS_KEY ],
220
+ job_last_known_status = job [JOB_LAST_KNOWN_STATUS_KEY ],
221
221
job_type = job [JOB_TYPE_KEY ],
222
222
job_creation_time = job [JOB_CREATION_TIME_KEY ],
223
223
client = self ,
Original file line number Diff line number Diff line change 42
42
ITEM_METADATA_SCHEMA_KEY = "item_metadata_schema"
43
43
JOB_ID_KEY = "job_id"
44
44
KEEP_HISTORY_KEY = "keep_history"
45
- JOB_STATUS_KEY = "job_last_known_status"
45
+ JOB_STATUS_KEY = "job_status"
46
+ JOB_LAST_KNOWN_STATUS_KEY = "job_last_known_status"
46
47
JOB_TYPE_KEY = "job_type"
47
48
JOB_CREATION_TIME_KEY = "job_creation_time"
48
49
LABEL_KEY = "label"
Original file line number Diff line number Diff line change @@ -366,4 +366,4 @@ def delete_annotations(
366
366
response = self ._client .delete_annotations (
367
367
self .id , reference_ids , keep_history
368
368
)
369
- return AsyncJob (response [ JOB_ID_KEY ] , self ._client )
369
+ return AsyncJob . from_json (response , self ._client )
Original file line number Diff line number Diff line change 6
6
JOB_CREATION_TIME_KEY ,
7
7
JOB_ID_KEY ,
8
8
JOB_STATUS_KEY ,
9
+ JOB_LAST_KNOWN_STATUS_KEY ,
9
10
JOB_TYPE_KEY ,
10
11
)
11
12
@@ -26,7 +27,7 @@ def status(self) -> Dict[str, str]:
26
27
route = f"job/{ self .job_id } " ,
27
28
requests_command = requests .get ,
28
29
)
29
- self .job_last_known_status = response ["job_status" ]
30
+ self .job_last_known_status = response [JOB_STATUS_KEY ]
30
31
return response
31
32
32
33
def errors (self ) -> List [str ]:
@@ -56,7 +57,7 @@ def sleep_until_complete(self, verbose_std_out=True):
56
57
def from_json (cls , payload : dict , client ):
57
58
return cls (
58
59
job_id = payload [JOB_ID_KEY ],
59
- job_last_known_status = payload [JOB_STATUS_KEY ],
60
+ job_last_known_status = payload [JOB_LAST_KNOWN_STATUS_KEY ],
60
61
job_type = payload [JOB_TYPE_KEY ],
61
62
job_creation_time = payload [JOB_CREATION_TIME_KEY ],
62
63
client = client ,
You can’t perform that action at this time.
0 commit comments