Skip to content

Commit c229df8

Browse files
committed
Progress
1 parent bcd1d89 commit c229df8

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

src/vws/vws.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,9 @@ def get_target_record(self, target_id: str) -> Dict[str, Union[str, int]]:
276276

277277
return dict(response.json()['target_record'])
278278

279-
@timeout_decorator.timeout(seconds=60 * 5)
280-
def wait_for_target_processed(self, target_id: str) -> None:
279+
def _wait_for_target_processed(self, target_id: str) -> None:
281280
"""
282-
Wait up to five minutes (arbitrary) for a target to get past the
283-
processing stage.
281+
Wait indefinitely for a target to get past the processing stage.
284282
285283
Args:
286284
target_id: The ID of the target to wait for.
@@ -305,6 +303,26 @@ def wait_for_target_processed(self, target_id: str) -> None:
305303
# hitting the request quota.
306304
sleep(0.2)
307305

306+
@timeout_decorator.timeout(seconds=60 * 5)
307+
def wait_for_target_processed(self, target_id: str) -> None:
308+
"""
309+
Wait up to five minutes (arbitrary) for a target to get past the
310+
processing stage.
311+
312+
Args:
313+
target_id: The ID of the target to wait for.
314+
315+
Raises:
316+
~vws.exceptions.AuthenticationFailure: The secret key is not
317+
correct.
318+
~vws.exceptions.Fail: There was an error with the request. For
319+
example, the given access key does not match a known database.
320+
TimeoutError: The target remained in the processing stage for more
321+
than five minutes.
322+
~vws.exceptions.UnknownTarget: The given target ID does not match a
323+
target in the database.
324+
"""
325+
308326
def list_targets(self) -> List[str]:
309327
"""
310328
List target IDs.

0 commit comments

Comments
 (0)