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
{{ message }}
Repository navigation
Commit 0daca28
Browse filesBrowse the repository at this point in the historyBrowse files
refactor!: Remove wait_for_finish from Actor.start (#962)
## Description
- Remove the `wait_for_finish` argument from `Actor.start()`. It
contradicted the method's purpose: `Actor.start()` only starts the run
without waiting for it to finish. The JS SDK does not expose it either.
To wait for a run to finish, use `Actor.call()`.
- Fix the `wait` docstrings of `Actor.call()` and `Actor.call_task()`,
which described a `timedelta` as "maximum number of seconds".
- Document the removal in the v4 upgrading guide.
Copy file name to clipboardExpand all lines: docs/04_upgrading/upgrading_to_v4.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,20 @@ 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
+
72
86
## Built on apify-client v3
73
87
74
88
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