nl_tokens: / * The constructor requires only one parameter worker a callback which starts a worker process . Optional parameters :
pl_tokens: function Startup ( options ) { /*jshint maxcomplexity: 11 */ options = options || { } ; this . _logPrefix = util . getLogPrefix ( ) ; this . worker = options . worker ; if ( ! this . worker ) { throw new Error ( 'Need to provide a worker callback!' ) ; } util . verifyType ( 'function' , this , 'worker' ) ; this . _stats = options . stats || new StatsD ( { prefix : process . env . THEHELP_APP_NAME + '.' } ) ; this . log = options . log || logShim ( 'thehelp-cluster:startup' ) ; util . verifyLog ( this . log ) ; this . masterOptions = options . masterOptions ; this . master = options . master || this . _defaultMasterStart . bind ( this ) ; util . verifyType ( 'function' , this , 'master' ) ; this . graceful = options . graceful || Graceful . instance ; // graceful supercedes messenger if ( ! this . graceful ) { this . messenger = <mask> . messenger || require ( 'thehelp-last-ditch' ) ; util . verifyType ( 'function' , this , 'messenger' ) ; } else { util . verifyGraceful ( this . graceful ) ; } this . _domain = domain . create ( ) ; this . _domain . on ( 'error' , this . _onError . bind ( this ) ) ; this . _process = options . _process || process ; this . _cluster = options . _cluster || cluster ; }