You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor!: Remove wait_for_finish from Actor.start
The argument contradicted the purpose of Actor.start, which only starts the run without waiting for it to finish, and the JS SDK does not expose it either. To wait for a run to finish, use Actor.call. The raw waitForFinish server param is still reachable via the underlying client.
Copy file name to clipboardExpand all lines: docs/04_upgrading/upgrading_to_v4.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,26 @@ The deprecated `latest_sdk_version`, `log_format`, and `standby_port` fields hav
69
69
- In place of `standby_port`, use `web_server_port`.
70
70
-`latest_sdk_version` and `log_format` don't have replacement. SDK version checking isn't supported for the Python SDK and the log format should be adjusted in code instead.
71
71
72
+
### `wait_for_finish` argument of `Actor.start`
73
+
74
+
The `wait_for_finish` argument of `Actor.start()` has been removed. It contradicted the purpose of `Actor.start()`, which only starts the run without waiting for it to finish. The JS SDK does not expose it on `Actor.start()` either. To wait for a run to finish, use `Actor.call()`.
75
+
76
+
```python
77
+
from datetime import timedelta
78
+
79
+
# Before (v3)
80
+
run =await Actor.start('my-actor-id', wait_for_finish=60)
81
+
82
+
# After (v4)
83
+
run =await Actor.call('my-actor-id', wait=timedelta(seconds=60))
84
+
```
85
+
86
+
If you need the raw server-side `waitForFinish` behavior (return the run after the server waits up to N seconds, without polling to completion), call the underlying client directly:
87
+
88
+
```python
89
+
run =await Actor.apify_client.actor('my-actor-id').start(wait_for_finish=60)
90
+
```
91
+
72
92
## Built on `apify-client` v3
73
93
74
94
The SDK is now built on [`apify-client`](https://docs.apify.com/api/client/python) v3 and no longer depends on `apify-shared`. The sections below cover the user-visible consequences; see the client's [Upgrading to v3](https://docs.apify.com/api/client/python/docs/upgrading/upgrading-to-v3) guide for the full list of changes in the client itself.
0 commit comments