Hi, I have a simple genserver
, when it is started I send an atom to handle_info
every 100 millisecond
like this:
def init(state) do
Logger.info("OTP UpdateChecker server was started")
{:ok, state, {:continue, :start_task}}
end
def handle_continue(:start_task, state) do
Process.send_after(self(), :check_update, @update_check_time)
{:noreply, state}
end
def handle_info(:check_update, state) do
Logger.info("OTP UpdateChecker check update tasks were sent.")
Process.send_after(self(), :check_update, @update_check_time)
{:noreply, state}
end
When my application is in developer mode and if a user run recompile
, the Process.send_after
does not send anymore.
So how can I check it to work after a recompiling, It happens when the time of send_after
is lower than recompile time
Thank you