UNPKG

division

Version:

Simple yet powerful wrapper over node.js cluster API. This module is inspired by impressive, but abandoned project Cluster created by TJ Holowaychuk.

15 lines (14 loc) 520 B
module.exports = function() { this.addSignalListener('SIGQUIT', this.close); this.addSignalListener('SIGINT', this.destroy); this.addSignalListener('SIGTERM', this.destroy); this.addSignalListener('SIGUSR2', this.restart); this.addSignalListener('SIGTTIN', this.increase); this.addSignalListener('SIGTTOU', this.decrease); this.addSignalListener('SIGHUP', (function(_this) { return function() { return console.log(_this.workers.length, _this.settings.size); }; })(this)); return this; };