fixes for uploading data continuously

This commit is contained in:
Mavis Ou 2013-05-08 15:28:33 -07:00
Родитель 5bf8060ef6
Коммит 6a696fe1dd
2 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -115,7 +115,6 @@ function onConnection(conn){
function appendNodeG(bucket,connection,nodeType){ function appendNodeG(bucket,connection,nodeType){
console.log(connection);
var g = svg('g', { var g = svg('g', {
'class': 'node ' + nodeType, 'class': 'node ' + nodeType,
'data-name': connection[nodeType] 'data-name': connection[nodeType]

Просмотреть файл

@ -411,7 +411,7 @@ Connection.upload = function(){
log('Beginning Upload'); log('Beginning Upload');
var lastUpload = storage.lastUpload || 0; var lastUpload = storage.lastUpload || 0;
var connections = storage.connections.filter(function(connection){ var connections = storage.connections.filter(function(connection){
return connection.timestamp > lastUpload; return ( connection.timestamp || connection[Connection.TIMESTAMP] ) > lastUpload;
}).map(Connection.restore); }).map(Connection.restore);
var data = exportFormat(connections); var data = exportFormat(connections);
var request = Request({ var request = Request({