lib/createWorkers.js
function _closeOnSignal(signal) {
    process.on(signal, onSignal);

    /**
     * @returns {void}
     */
    function onSignal() {
      logger.info({ workerName: configuration.workerName, signal },
        '[worker#listen] Received exit signal, stopping workers...');
      workers.close(true);
    }
  }
function _closeOnSignal(signal) {
    process.on(signal, onSignal);

    /**
     * @returns {void}
     */
    function onSignal() {
      logger.info({ workerName: configuration.workerName, signal },
        '[worker#listen] Received exit signal, stopping workers...');
      workers.close(true);
    }
  }
function _closeOnSignal ( signal ) { process . on ( signal , onSignal ) ; /**
     * @returns {void}
     */ function onSignal ( ) { logger . info ( { workerName : configuration . workerName , signal } , '[worker#listen] Received exit signal, stopping workers...' ) ; workers . close ( true ) ; } }
Listen to exit signal such as SIGINT and close the workers
@param {String} signal name (e.g. SIGINT)
@returns {void}
@private
Listen to exit signal such as SIGINT and close the workers