nanny icon indicating copy to clipboard operation
nanny copied to clipboard

Event order + Fixes

Open Matt-Esch opened this issue 9 years ago • 2 comments

Worker state change events need to be hooked up before the process is started. This is achieved by initializing the process on next tick.

However, this breaks the assumption that worker.process exists immediately after initialization. To work around this, we re-emit the process message on the worker and subscribe to worker.on('message', ...) instead.

Also fixes a minor edge case where workers do not restart if the restart delay is 0.

Matt-Esch avatar Apr 28 '15 02:04 Matt-Esch

Looks good to me.

kriskowal avatar Apr 28 '15 06:04 kriskowal

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

claassistantio avatar Dec 30 '19 10:12 claassistantio