bye forever, forever

This commit is contained in:
Flummi 2017-11-08 22:35:58 +01:00
parent 6b6fab41c7
commit 1d44d7baa1

View File

@ -1,31 +0,0 @@
const forever = require(__dirname+'/../node_modules/forever-monitor');
var child = new (forever.Monitor)(`${__dirname}/bot.js`, {
max: 1,
silent: false,
cwd: __dirname,
args: [],
spinSleepTime: 5000,
watch: true,
watchIgnoreDotFiles: true,
watchIgnorePatterns: [
'node_modules/*',
'tmp/*'
],
watchDirectory: __dirname
});
child.on('watch:restart', info => {
console.log(`Restaring bot because ${info.stat} changed`);
});
child.on('restart', () => {
console.log(`restarting bot for ${child.times} time`);
});
child.on('start', () => {
console.log('starting bot');
});
child.on('exit:code', code => {
console.log(`detected bot exited with code ${code}`);
//child.restart();
});
child.start();