|
@@ -4,6 +4,7 @@ const spawn = require("child_process").spawn;
|
|
const path = require("path");
|
|
const path = require("path");
|
|
const express = require('express');
|
|
const express = require('express');
|
|
const version = require('./package.json').version;
|
|
const version = require('./package.json').version;
|
|
|
|
+require('console-stamp')(console, 'HH:MM:ss.l');
|
|
|
|
|
|
var working = false;
|
|
var working = false;
|
|
|
|
|
|
@@ -66,12 +67,12 @@ function process_queue() {
|
|
proc.on("exit", code => {
|
|
proc.on("exit", code => {
|
|
working = false;
|
|
working = false;
|
|
proc = null;
|
|
proc = null;
|
|
- if (code == 2) {
|
|
|
|
- od_ref.child(key).update({status: "no_index"});
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (code === 0) {
|
|
od_ref.child(key).update({status: "done"});
|
|
od_ref.child(key).update({status: "done"});
|
|
|
|
+ console.log("done", key);
|
|
|
|
+ } else {
|
|
|
|
+ console.error(`wrong process code: ${code}`)
|
|
}
|
|
}
|
|
- console.log("done", key);
|
|
|
|
process_queue();
|
|
process_queue();
|
|
});
|
|
});
|
|
}
|
|
}
|