Adding a SIGTERM Listener to an Effect-Based Server
Hello, for the context of my question see https://github.com/IMax153/advanced-effect-workshop/blob/main/workshop/exercises/session-01/project.ts
I am trying to add a SIGTERM listener to the example.
First, I added a simple Effect.timeout to shutdown the server after 2 seconds and it works as expected
Then I tried to replace Effect.timeout with an Effect.async for handle SIGTERM, but it is not executed (added a simple console.log to check)
Therefore I started playing with Effect.log and I try to understand the behaviours of these example, why "Log something here..." has not be written?
Thank you
I am trying to add a SIGTERM listener to the example.
First, I added a simple Effect.timeout to shutdown the server after 2 seconds and it works as expected
Then I tried to replace Effect.timeout with an Effect.async for handle SIGTERM, but it is not executed (added a simple console.log to check)
Therefore I started playing with Effect.log and I try to understand the behaviours of these example, why "Log something here..." has not be written?
Thank you
