File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -246,15 +246,14 @@ def fetch(self):
246
246
247
247
return self
248
248
249
-
250
- def pull (self ,poll_interval :float = 20 ):
249
+ def pull (self , poll_interval : float = 20 ):
251
250
"""
252
251
Blocking pull to get the task result.
253
252
poll_interval is the time interval to poll the task status.
254
253
Please ensure that it is relatively large, otherwise
255
254
the server could get overloaded with queries.
256
255
"""
257
-
256
+
258
257
while True :
259
258
if self ._task_result_ir .task_status is QuEraTaskStatusCode .Unsubmitted :
260
259
raise ValueError ("Task ID not found." )
@@ -272,7 +271,7 @@ def pull(self,poll_interval:float=20):
272
271
if status in [QuEraTaskStatusCode .Completed , QuEraTaskStatusCode .Partial ]:
273
272
self ._task_result_ir = self ._http_handler .fetch_results (self ._task_id )
274
273
return self
275
-
274
+
276
275
time .sleep (poll_interval )
277
276
278
277
def cancel (self ):
You can’t perform that action at this time.
0 commit comments