Leverege Platform

Leverege Platform

  • Overview
  • JSDocs
  • REST API
  • Help

›JSDoc

JSDoc

  • Home
  • API Server
  • API Attributes
  • Api Patch Ops
  • API Redux
  • Array Util
  • Base62 Util
  • Cache
  • Cluster Manager
  • Data Store
  • Exit
  • Factory
  • Limit
  • Lock
  • Message Queue
  • Messages
  • Path
  • Permissions
  • Reasoner
  • String Util
  • UI Active Theme
  • UI Elements
  • UI Linear View Elements
  • UI Mapbox Elements
  • Validator

Cluster Manager

start(options, [startFunction], [masterFunction])

There are two ways of using this. If you supply a startFunction, invoke this from your start file. The startFunction will be called when the process is not the master. If startFunction is not supplied, this method should only be called when Cluster.isMaster is true, and it is up to the invoker to handle the non-master case.

Kind: global function

ParamTypeDescription
optionsobjectthe options for the cluster manager
[options.count]intnumber of child processes to start. If not set, This will use the env variable CM_MAX_CHILD_PROCESSES or MAX_CHILD_PROCESSES or 32 clamped to the number of cpus to determine the number of child processes to start
[options.autoRestart]booleanIf true, cluster manager will restart a child on exit (default true)
options.webServerPortfalse \intif a port is supplied this will start a web server
[options.webServerSetup]functionoptional function to configure the express server
[options.adjustRootStatus]functiona optional intercept to allow you to change the status object returned by hitting the webServer root
options.sendStatusOnRestartbooleanIf true, sends the last status reported by a child to its reforked replacement (default true)
options.updateStatusMsintIf startFunction is supplied, this is used when connecting to the parent process to define the status update rate.
[startFunction]functionthe function used to start the child processes. It is only invoked on child processes
[masterFunction]functionthis will be called if the process is the master
← CacheData Store →
  • start(options, [startFunction], [masterFunction])
Leverege Platform
Docs
Overview
Connect
FacebookLinkedInTwitter
Facebook Open Source