Commit c2ef92f9 authored by project's avatar project

--no commit message

--no commit message
parent d11e118d
...@@ -108,6 +108,7 @@ router.get('/:id/objects',function (req, res) { ...@@ -108,6 +108,7 @@ router.get('/:id/objects',function (req, res) {
res.type('application/json'); res.type('application/json');
res.write('['); res.write('[');
var resultIdx=0; var resultIdx=0;
var counter=0;
async.whilst( async.whilst(
function() { return cont; }, function() { return cont; },
function(callback){ function(callback){
...@@ -116,9 +117,14 @@ router.get('/:id/objects',function (req, res) { ...@@ -116,9 +117,14 @@ router.get('/:id/objects',function (req, res) {
if(!obj){ if(!obj){
cont=false; cont=false;
}else{ }else{
var objout = obj_out(obj); var dataout = JSON.stringify(obj_out(obj));
if(resultIdx>0){res.write(',');} if(resultIdx>0){res.write(',');}
res.write(JSON.stringify(objout)); res.write(dataout);
counter+=dataout.length;
if(counter>1000000){
res.flush();
counter=0;
}
if(limit>0 && idx>=from_seq+limit){ if(limit>0 && idx>=from_seq+limit){
cont=false; cont=false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment