mirror of
https://github.com/vale981/doccam-pi
synced 2025-03-05 09:21:40 -05:00
yep
This commit is contained in:
parent
5119791a43
commit
32f79e7eb0
1 changed files with 20 additions and 17 deletions
9
main.js
9
main.js
|
@ -37,8 +37,8 @@ let logger = new(winston.Logger)({
|
||||||
new(winston.transports.Console)({
|
new(winston.transports.Console)({
|
||||||
level: 'success'
|
level: 'success'
|
||||||
}),
|
}),
|
||||||
new(winston.transports.File)({
|
new(winston.winston.transports.File)({
|
||||||
filename: __dirname + '/process.log',
|
file: __dirname + '/process.log',
|
||||||
colorize: true,
|
colorize: true,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
json: true,
|
json: true,
|
||||||
|
@ -68,7 +68,7 @@ let spawn = function() {
|
||||||
})
|
})
|
||||||
.videoCodec('copy');
|
.videoCodec('copy');
|
||||||
|
|
||||||
if(config.customOutputOptions !== "")
|
if (config.customOutputOptions !== "")
|
||||||
cmd.outputOptions(config.customOutputOptions.split(','));
|
cmd.outputOptions(config.customOutputOptions.split(','));
|
||||||
|
|
||||||
cmd.on('start', function(commandLine) {
|
cmd.on('start', function(commandLine) {
|
||||||
|
@ -149,6 +149,7 @@ function imDead(why, e = '') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function criticalProblem(err, e, handler, ...args) {
|
function criticalProblem(err, e, handler, ...args) {
|
||||||
|
if (!mustBe) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
status.running = 2
|
status.running = 2
|
||||||
status.error = err
|
status.error = err
|
||||||
|
@ -162,6 +163,8 @@ function criticalProblem(err, e, handler, ...args) {
|
||||||
});
|
});
|
||||||
handler(args)
|
handler(args)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
}
|
||||||
|
mustBe = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDisc(info) {
|
function handleDisc(info) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue