Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 23ffda0

Browse filesBrowse files
committed
Improve docs for handling the MIGRATING event
1 parent 93fc7c8 commit 23ffda0
Copy full SHA for 23ffda0

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed

‎docs/docs.md

Copy file name to clipboardExpand all lines: docs/docs.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ The following events can be emitted:
598598
* ActorEventTypes.MIGRATING:
599599

600600
Emitted when the actor running on the Apify platform is going to be migrated to another worker server soon.
601-
You can use it to persist the state of the actor and abort the run, to speed up the migration.
601+
You can use it to persist the state of the actor and gracefully stop your in-progress tasks,
602+
so that they are not interrupted by the migration..
602603

603604
* ActorEventTypes.PERSIST_STATE:
604605

‎src/apify/actor.py

Copy file name to clipboardExpand all lines: src/apify/actor.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,8 @@ def on(cls, event_name: ActorEventTypes, listener: Callable) -> Callable:
681681
Emitted every minute, the event data contains info about the resource usage of the actor.
682682
- `ActorEventTypes.MIGRATING`:
683683
Emitted when the actor running on the Apify platform is going to be migrated to another worker server soon.
684-
You can use it to persist the state of the actor and abort the run, to speed up the migration.
684+
You can use it to persist the state of the actor and gracefully stop your in-progress tasks,
685+
so that they are not interrupted by the migration..
685686
- `ActorEventTypes.PERSIST_STATE`:
686687
Emitted in regular intervals (by default 60 seconds) to notify the actor that it should persist its state,
687688
in order to avoid repeating all work when the actor restarts.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.