0

I'm exploring Elixir language, also deep into Erlang environment recently.

I want to know how to use hot upgrade in this situation:
Usually we deploy a application begin with a root supervisor. After it's running for a few weeks, I want add a new GenServer to the root supervisor.

Could the GenServer be auto start up after deploy a hot upgrade?
Do I need to shutdown and start up the Erlang VM if I'm adding a new GenServer?

Máté
  • 2,294
  • 3
  • 18
  • 25
LoranceChen
  • 2,453
  • 2
  • 22
  • 48
  • Just kill the supervisor from within it’s [`GenServer.code_change/3`](https://hexdocs.pm/elixir/GenServer.html#c:code_change/3) callback. – Aleksei Matiushkin Jun 12 '18 at 08:38
  • Hi, sorry for replay so late. Could you give a example about how to properly kill the supervisor and the definition of `GenServer.code_change/3`? – LoranceChen Jun 18 '18 at 02:09
  • @LoranceChen some psuedo code illustrating what you are trying to do might help the answerers provide better answers. – Stratus3D Jun 19 '18 at 15:05

0 Answers0