瀏覽代碼

removed unused code

Gamaliel Espinoza 7 年之前
父節點
當前提交
ee9e88e8dc
共有 1 個文件被更改,包括 1 次插入15 次删除
  1. 1 15
      ondemand.js

+ 1 - 15
ondemand.js

@@ -8,11 +8,8 @@ const moment = require('moment');
 require('console-stamp')(console, 'HH:MM:ss.l');
 
 var working = false;
-
 var queue = {};
-
 var od_ref = db.ref("devices").child(config.device_id).child("ondemand");
-
 var proc;
 
 
@@ -20,12 +17,6 @@ function process_queue() {
   if (working) return;
   working = true;
 
-  //var key = Object.keys(queue)[0];
-  //if (!key) return;
-
-  //var job = queue[key];
-
-  //delete queue[key];
   var job = queue.shift();
   if(!job) {
     console.log("nothing left to do");
@@ -49,7 +40,6 @@ function process_queue() {
   });
 
   var params = [
-    "-u",
     path.join(config.installDir,"fourier/process_timespan_nodb.py"),
     config.device_id,
     job.station,
@@ -87,7 +77,7 @@ function process_queue() {
 }
 
 function addAndProc(key, job) {
-    //queue[key] = job;
+  //queue[key] = job;
   queue.push(job);
   job.key = key;
   process_queue();
@@ -100,10 +90,6 @@ function start() {
     console.log("added", snp.key);
     addAndProc(snp.key, snp.val());
   });
-
-  //od_ref.on("child_changed", snp => {
-  //  addAndProc(snp.key, snp.val());
-  //});
 }
 
 let endpoint = express();