I'm new to Elixir and OTP, I believe that Pooly version 3 contains 2 issues - I can be wrong.
First one is kind of obvious when you checkout a worker for the pool and kill it. Fix here
Second one is more subtle. When above got fixed I relised that now I'm getting 2 new workers from single killed one. Reason of that is that WorkerSupervisor will restart dead worker as well as PoolServer (as long as it was checkouted). There's no simple solution to the problem without going too far away from book content so I most obvious solution would be to keep WorkerSupervisor's restart to :temporary - Fix is here
Please let me know what do you think :) Hope that above makes sense
Hello,
I'm new to Elixir and OTP, I believe that Pooly version 3 contains 2 issues - I can be wrong.
First one is kind of obvious when you
checkout
a worker for the pool and kill it. Fix hereSecond one is more subtle. When above got fixed I relised that now I'm getting 2 new workers from single killed one. Reason of that is that
WorkerSupervisor
willrestart
dead worker as well asPoolServer
(as long as it wascheckout
ed). There's no simple solution to the problem without going too far away from book content so I most obvious solution would be to keepWorkerSupervisor
'srestart
to:temporary
- Fix is herePlease let me know what do you think :) Hope that above makes sense
Thanks,
Kamil