Skip to content

Commit 179cb53

Browse files
authored
docs: fix input guide example to bound the wait with wait_duration (#955)
The "Pass input to an Actor" guide example claimed that `timeout=timedelta(seconds=60)` makes `call()` wait up to 60 seconds for the run to finish. It doesn't. On `call()`, `timeout` is the per-request HTTP timeout forwarded to `start()`, while the wait cap is `wait_duration` (default `None`, i.e. wait indefinitely). A user copying the example would block indefinitely on a long or never-finishing run. The sync and async examples now use `wait_duration=timedelta(seconds=60)` and the comment is reworded accordingly. The stale copies under `website/versioned_docs/` are left untouched on purpose. The versioning workflow deletes and re-snapshots `version-3.0` from `docs/` on every 3.x release, so the fix propagates there automatically.
1 parent 4e7a566 commit 179cb53

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎docs/03_guides/code/01_input_async.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ async def main() -> None:
1515

1616
input_data = {'hashtags': ['rainbow'], 'resultsLimit': 20}
1717

18-
# Run the Actor and wait for it to finish up to 60 seconds.
18+
# Run the Actor and wait up to 60 seconds for it to finish.
1919
# Input is not persisted for next runs.
2020
run_result = await actor_client.call(
21-
run_input=input_data, timeout=timedelta(seconds=60)
21+
run_input=input_data, wait_duration=timedelta(seconds=60)
2222
)
2323

2424

‎docs/03_guides/code/01_input_sync.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ def main() -> None:
1414

1515
input_data = {'hashtags': ['rainbow'], 'resultsLimit': 20}
1616

17-
# Run the Actor and wait for it to finish up to 60 seconds.
17+
# Run the Actor and wait up to 60 seconds for it to finish.
1818
# Input is not persisted for next runs.
19-
run_result = actor_client.call(run_input=input_data, timeout=timedelta(seconds=60))
19+
run_result = actor_client.call(
20+
run_input=input_data, wait_duration=timedelta(seconds=60)
21+
)
2022

2123

2224
if __name__ == '__main__':

0 commit comments

Comments
 (0)