bugfix
This commit is contained in:
parent
5d043b6f64
commit
04045e8162
13
bot.js
13
bot.js
@ -1,5 +1,5 @@
|
||||
var forever = require('forever-monitor');
|
||||
var fs = require('fs-extra');
|
||||
var forever = require(__dirname+'/node_modules/forever-monitor');
|
||||
var fs = require(__dirname+'/node_modules/fs-extra');
|
||||
|
||||
var getDateTimeString = () => {
|
||||
var date = new Date();
|
||||
@ -14,16 +14,17 @@ var getDateTimeString = () => {
|
||||
day = (day < 10 ? "0" : "") + day;
|
||||
return year + "-" + month + "-" + day + "_" + hour + "-" + min;
|
||||
};
|
||||
var log_forever = './log/forever_'+getDateTimeString()+'.log';
|
||||
var log_bot = './log/bot_'+getDateTimeString()+'.log';
|
||||
var err_bot = './log/err_'+getDateTimeString()+'.log';
|
||||
var log_forever = __dirname+'/log/forever_'+getDateTimeString()+'.log';
|
||||
var log_bot = __dirname+'/log/bot_'+getDateTimeString()+'.log';
|
||||
var err_bot = __dirname+'/log/err_'+getDateTimeString()+'.log';
|
||||
var putlog = (msg) => {
|
||||
fs.appendFileSync(log_forever, msg, 'utf8');
|
||||
};
|
||||
|
||||
var child = new (forever.Monitor)('./src/main.js', {
|
||||
var child = new (forever.Monitor)(__dirname+'/src/main.js', {
|
||||
max: 1,
|
||||
silent: false,
|
||||
cwd: __dirname,
|
||||
args: [],
|
||||
spinSleepTime: 2000,
|
||||
watch: true,
|
||||
|
Loading…
Reference in New Issue
Block a user