-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
bugSomething isn't working.Something isn't working.t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.
Description
Issue description
Actor.reboot calls all listeners attached to persistState
and migrating
. Our code examples expect data to be an object but currently reboot calls listeners without parameters so the example would crash.
At minimum we should send empty object but ideally we figure out some values that are consistent. Currently, there can be { isMigrating: boolean }
(and I recently proposed also { isAborting: boolean }
so I guess we should re-send these. We could include something like calledByReboot: boolean
so users can not persist again after the same listener is called again but I wouldn't do that yet, we might want to rethink how this works (will make separate issue)
Code sample
Actor.on('persistState', async (data) => {
// This listener is called again by reboot but 'data' is undefined
if (data.isMigrating) {
await Actor.reboot()
}
})
Package version
latest
Node.js version
latest
Operating system
No response
Actor or run link
No response
I have tested this on the next
release
No response
Other context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't working.Something isn't working.t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.