I need help with something…
I am building an application that manages workers, these workers are simple GenServers with an state.
I have a separated process that keeps tracks of all the workers, basically this process is another GenServer that monitors the workers adding and removing pids from his state. I am using Process.monitor to do so.
I have a DynamicSupervisor that supervises the workers…
The problem is that when the supervisor restarts a worker I want to update the state of the monitor genserver by updating the old pid with the new one.
Process.monitor only notifies when the process dies and provides the old pid but I need the new pid to replace the old one.
Any Ideas? I am new in elixir