doxout / recluster

Node clustering library with support for zero downtime reloading
522 stars 44 forks source link

recluster.terminate accepts a callback #34

Closed dodev closed 9 years ago

dodev commented 9 years ago

Hey!

This is a follow up for #33 Please note, that my test fails. I posted this PR, because reviewing the code here will be easier than in the issues.

Can you give me some pointers, I'm in a bit of a pickle - after the cluster terminates it should have 0 workers right? The test fails with message, that it expects 0 workers but balancer.workers.length is equal to 1.

PS, on linux and nodejs 0.12 only 27 of 33 tests pass, without my changes.

spion commented 9 years ago

Sorry, it turned out that the tests were quite broken, and only way to fix them was to implement the terminate listener and wait for a proper clean up before running the next test :)

In any case, this feature has been added as a side-effect, so I think its okay to close this PR

dodev commented 9 years ago

Well, the important thing is that the feature is now available on npm :+1: Thanks!