2

I have a supervised elixir app which I am running like :- MIX_ENV=dev mix run. Now if I change the code, then how can I restart the app gracefully by not killing it first. (Just like we gracefully restart the supervisord process using HUP)

Shubham Sharma
  • 175
  • 2
  • 16

1 Answers1

0

the nitty gritty details of the actual code hot swapping you can find in the answer to this question:

Achieving code swapping in Erlang's gen_server

as to how to automate the process of reloading you can have a look at phoenix and how it does the reloading. the summary of it is it uses fs lib to monitor file system changes and invoke a process similar to the one outlined in the answer to the question above.

Community
  • 1
  • 1
ash
  • 711
  • 4
  • 8