Dispatch Should Spawn
Test if a dispatch fleet command is already spawned the allotted number of instances
Installation
npm install -S dispatch-should-spawn
Usage
var shouldSpawn = require('dispatch-should-spawn')
var record = {
host: 'localhost',
port: 7000,
secret: 'foo_secret',
command: 'node startServer.js',
instances: 4
drone: 'fooDrone'
}
shouldSpawn(record, function (err, reply) {
if (err) {
inspect(err, 'error checking if dispatch should should spawn command')
return
}
inspect(reply, 'should command be spawned')
})
Test
npm install
npm test