4 ms·
So how does it work if there are workers in flight and you redeploy the main application?
by hq1 3y ago
So how does it work if there are workers in flight and you redeploy the main application?
- bo0tzz 3y agoThe workers get terminated. If the work they were doing is important, it should be getting called from your job queue and so it should just get started up again.
- chrismccord 3y agoIf you're talking about inflight work that is running on the runner, there is a Terminator process on the runner that will see the parent go away, then block on application shutdown for the configured `:shutdown_timeout` as long as active work is being done. So active processes/calls/casts are given a configurable amount of time to finish and no more work is accepted by the runner. If you're talking about a FLAME.call at app shutdown that hasn't yet reached the runner, it will follow the same app shutdown flows of the rest of your code and eventually drop into the ether like any other code path you have. If you want durability you'd reach for your job queue (like Oban in Elixir) under the same considerations as regular app code. Make sense?