added range to history log

pull/5/head
cubedro 10 years ago
parent 98253b9f3f
commit ec83b07f14
  1. 8
      app.js

@ -65,8 +65,10 @@ api.on('connection', function(spark) {
if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id)) if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id))
{ {
var range = Nodes.getHistory().getHistoryRequestInterval();
console.log("asked " + data.id + " for history"); console.log("asked " + data.id + " for history");
spark.emit('history', Nodes.getHistory().getHistoryRequestInterval()); console.log('interval', range);
spark.emit('history', range);
askedForHistory = true; askedForHistory = true;
} }
@ -90,8 +92,10 @@ api.on('connection', function(spark) {
if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id)) if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id))
{ {
var range = Nodes.getHistory().getHistoryRequestInterval();
console.log("asked " + data.id + " for history"); console.log("asked " + data.id + " for history");
spark.emit('history', Nodes.getHistory().getHistoryRequestInterval()); console.log('interval', range);
spark.emit('history', range);
askedForHistory = true; askedForHistory = true;
} }
} }

Loading…
Cancel
Save