Replies: 1 comment
-
|
Yes, I agree this would be a useful opt-in feature for event handlers. A pull request would be very welcome, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Event Handler State is provided in the init/1 callback and can be updated in each handle/2
https://hexdocs.pm/commanded/1.3.0/Commanded.Event.Handler.html#module-event-handler-state
This is pretty handy, but at this moment the state is ephemeral, which means that on server restart, there is a need to reconstruct the state.
It would be awesome if the EventHandler state could be persisted in the same fashion as the Process Manager state.
commanded/lib/commanded/process_managers/process_manager_instance.ex
Lines 82 to 84 in 1c8af07
commanded/lib/commanded/process_managers/process_manager_instance.ex
Line 243 in 1c8af07
If there is value in doing this I can start implementing this.
Beta Was this translation helpful? Give feedback.
All reactions