Skip to content

Commit 6a60183

Browse files
Adam Dobrawyclaude
andcommitted
Add docstring to Job.join()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b608829 commit 6a60183

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

python_anticaptcha/base.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ def __repr__(self) -> str:
6868
return f"<Job task_id={self.task_id}>"
6969

7070
def join(self, maximum_time: int | None = None, on_check=None) -> None:
71+
"""Poll for task completion, blocking until ready or timeout.
72+
73+
:param maximum_time: Maximum seconds to wait (default: ``MAXIMUM_JOIN_TIME``).
74+
:param on_check: Optional callback invoked after each poll with
75+
``(elapsed_time, status)`` where *elapsed_time* is the total seconds
76+
waited so far and *status* is the last task status string
77+
(e.g. ``"processing"``).
78+
:raises AnticaptchaException: If *maximum_time* is exceeded.
79+
"""
7180
elapsed_time = 0
7281
maximum_time = maximum_time or MAXIMUM_JOIN_TIME
7382
while not self.check_is_ready():

0 commit comments

Comments
 (0)