Hello all,
If I need to hook something after master load, I'm currently doing:
before_fork do |server, worker|
# worker 0 is the first to init, so hold the master here
if worker.nr == 0
#warm up server...
#kill old pid...
end
# other stuff for each worker
end
Both operations I currently do (server warm up and old pid kill) need
to be run only once, and not for every worker as before_fork does,
that's why I had to put the condition seen above.
So hooks for master is needed, something like
master_after_load(server) and master_init(server).
What do you think?
cheers,
bráulio