How to make a long-running effect program emit events?
Hello! I have some business logic that is quite long to run, and I'd like it to "emit" some event. The idea is to be able to dynamically emit the total percentage of completion.
I tried to wrap my business logic with
Stream.async
Stream.async
and
emit
emit
, but I'm not sure this is the right way of doing it + I'm not sure how to run
Effect.gen
Effect.gen
inside it
Do you have any hints?
To give you more context, I'm using SSE to update my front-end while the business logic is running