Explorar el Código

started and ended recognizing

Gamaliel Espinoza hace 7 años
padre
commit
290c58955f
Se han modificado 2 ficheros con 9 adiciones y 3 borrados
  1. 8 2
      ondemand.js
  2. 1 1
      package.json

+ 8 - 2
ondemand.js

@@ -42,7 +42,10 @@ function process_queue() {
     return;
   }
 
-  od_ref.child(key).update({status: "in_progress"});
+  od_ref.child(key).update({
+    status: "in_progress",
+    startedRecognizing: moment().unix()
+  });
 
   var params = [
     path.join(config.installDir,"fourier/process_timespan_nodb.py"),
@@ -69,7 +72,10 @@ function process_queue() {
     working = false;
     proc = null;
     if (code === 0) {
-      od_ref.child(key).update({status: "done"});
+      od_ref.child(key).update({
+        status: "done",
+        endedRecognizing: moment().unix()
+      });
       console.log("done", key);
     } else {
       console.error(`wrong process code: ${code}`)

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "fourier-ondemand",
-  "version": "1.0.2b",
+  "version": "1.0.2b2",
   "description": "",
   "main": "index.js",
   "dependencies": {