Commit 7ba0221
authored
fix: allow calling
This fixes several issues with the `Actor.reboot()` behavior:
- `Actor.reboot()` waits for all event handlers to finish, but if itself
it was called in an event handler, it would be waiting for itself,
getting into a deadlock
- `Actor.reboot()` in the JS SDK triggers event handlers for the
`migrating` and `persistState` events, but in the Python SDK it was
triggering only the `persistState` handlers
This aligns the behavior to work like the JS SDK, and prevents reboot
getting into an infinite loop by allowing it to be called only once.
Related PR in JS SDK: apify/apify-sdk-js#345Actor.reboot() from migrating handler, align reboot behavior with JS SDK (#361)1 parent 2d4b8d0 commit 7ba0221
File tree
4 files changed
+30
-5
lines changed- docs/03-concepts
- src/apify
4 files changed
+30
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
839 | 841 | | |
840 | 842 | | |
841 | 843 | | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
842 | 850 | | |
843 | 851 | | |
844 | 852 | | |
845 | | - | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
846 | 865 | | |
847 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
848 | 870 | | |
849 | 871 | | |
850 | 872 | | |
| |||
0 commit comments