Skip to content

Recommended way to incorporate local persistence updating and observing? #333

Discussion options

You must be logged in to vote

I would probably lean towards using runningSideEffect if it meets your needs, i.e. your doing work inline. Workers are a little simpler if you already have a stream, since you can just call .asWorker().

I think you're on the right track with storing a list of updates in the state. Every time an update finishes, a WorkflowAction should remove that update from the list. The library doesn't do any serializing of tasks for you, if you want to execute tasks serially instead of concurrently, you need to implement that yourself (e.g. by using a queue in your state).

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rjrjr
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #104 on February 18, 2021 17:32.