Skip to content

Commit 23ffda0

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

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/docs.md

Lines 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

Lines 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)