Description
In the classic (0.10) cluster scheduler (SCHED_NONE), when worker.disconnect()
is called, the worker immediately emits a "disconnect" event, then proceeds to wait for exiting connections to close before terminating the child process:
Line 404 in f299d87
In the Round Robin mode, worker.disconnect()
does not fire a disconnect event, and it waits for all the handles to close before disconnecting the child process.
Line 655 in f299d87
In short, the old behavior was to: 1) fire "disconnect", 2) wait for handles to close, 3) fire "exit". The new behavior is 1) disconnect IPC (but don't fire "disconnect" event), 2) wait for handles to close, 3) fire "disconnect" event, 4) fire "exit" event
The scenario I'm looking at is if a worker disconnects, I'd like the master to immediately start a new worker in its place, while waiting for the previous worker to terminate (or force terminate it if it takes too long to close on its own).
This was possible with the old scheduler, but not the round robin scheduler.