Hi. I am using a GenServer to store a number of global constants on ETS. These constants combine data from a variable set of Elixir modules. The constants are derived after compilation, with :application.get_key(:my_app, :modules) supplying the module names (from which the data is extracted). Prior to compilation, get_key/2 seems to return nil.
This approach might work in production; in development, however, I must remember to restart the server manually, every time a change is made to the data-containing modules. I was therefore wondering whether there might be a way of triggering a GenServer restart, every time phoenix_live_reload fires following the detection of a change in my Elixir code.