Auto start by default, implement start of modes
This commit is contained in:
parent
70bd524ebe
commit
c182c1316e
|
@ -120,9 +120,9 @@ var Robot = module.exports = function Robot(opts) {
|
|||
this.commands = opts.commands;
|
||||
}
|
||||
|
||||
var auto_start = Utils.fetch(Config, 'auto_start', true);
|
||||
var mode = Utils.fetch(Config, 'mode', 'auto_start');
|
||||
|
||||
if (auto_start) {
|
||||
if (mode === 'auto_start') {
|
||||
// run on the next tick, to allow for 'work' event handlers to be set up
|
||||
setTimeout(this.start, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue