singleton icon indicating copy to clipboard operation
singleton copied to clipboard

Possible change in manager process

Open sonic182 opened this issue 4 years ago • 1 comments

It is possible that this line

https://github.com/arjan/singleton/blob/ae3d0dd970954626beb90fddf8c83b6840cb6920/lib/singleton/manager.ex#L18

is the one that make managers process not to be restarted, when normal shutdown of process used in singleton?

when scaling down one service, my single process gets down and doesn't get up in remaining nodes of service... I think is because it gets detected as normal shutdown instead of abruptly

https://hexdocs.pm/elixir/Supervisor.html#module-restart-values-restart

If so, would be nice to pass the restart value by config, when starting the singleton

sonic182 avatar Apr 28 '21 09:04 sonic182

Yes indeed, transient causes the process only to be restarted if it exited abnormally. PR welcome to change this :-)

arjan avatar Apr 28 '21 12:04 arjan