mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
where?
This commit is contained in:
parent
1fe4d3ed94
commit
a7ab172169
@ -300,6 +300,7 @@
|
||||
if(!o.reverse && ((key < o.next && 0 != o.next.indexOf(key)) || (u !== o.end && (o.end || '\uffff') < o.next))){ o.more = 0 }
|
||||
if(o.reverse && ((key > o.next && 0 != key.indexOf(o.next)) || ((u !== o.start && (o.start || '') > o.next && file <= o.start)))){ o.more = 0 }
|
||||
}
|
||||
console.log(5, process.memoryUsage().heapUsed);
|
||||
if(!o.more){ cb(g.err, data, o); return }
|
||||
if(data){ cb(g.err, data, o) }
|
||||
if(o.parsed >= o.limit){ return }
|
||||
@ -312,6 +313,7 @@
|
||||
},0);
|
||||
}
|
||||
g.check = function(err, disk, info){
|
||||
console.log(4, process.memoryUsage().heapUsed);
|
||||
g.get(err, disk, info);
|
||||
if(!disk || disk.check){ return } disk.check = 1;
|
||||
var S = +new Date;
|
||||
@ -356,6 +358,7 @@
|
||||
p.read = function(err, data){ var tmp;
|
||||
DBG && (DBG.rpg = +new Date);
|
||||
console.STAT && console.STAT(S, +new Date - S, 'read disk', JSON.stringify(file), ++RPC, 'total all parses.');
|
||||
console.log(2, process.memoryUsage().heapUsed);
|
||||
if((p.err = err) || (p.not = !data)){
|
||||
delete Q[file];
|
||||
p.map(q, p.ack);
|
||||
@ -384,6 +387,7 @@
|
||||
return;
|
||||
}
|
||||
parse(data, function(err, tree){
|
||||
console.log(3, process.memoryUsage().heapUsed);
|
||||
if(!err){
|
||||
delete Q[file];
|
||||
p.disk.$ = tree;
|
||||
|
@ -66,12 +66,12 @@ function Store(opt){
|
||||
var cbs = c.g[file] = [cb];
|
||||
var params = {Bucket: opts.bucket, Key: file||''};
|
||||
//console.log("RS3 GET ---->", file);
|
||||
return;
|
||||
s3.getObject(params, function got(err, ack){
|
||||
if(err && 'NoSuchKey' === err.code){ err = u }
|
||||
console.log("RS3 GOT <----", err, file, cbs.length, ((ack||{}).Body||'').toString().slice(0,20));
|
||||
console.log("RS3 GOT <----", err, file, cbs.length, ((ack||{}).Body||'').length);//.toString().slice(0,20));
|
||||
delete c.g[file];//Gun.obj.del(c.g, file);
|
||||
var data, data = (ack||'').Body;
|
||||
console.log(1, process.memoryUsage().heapUsed);
|
||||
var i = 0, cba; while(cba = cbs[i++]){ cba && cba(err, data) }//Gun.obj.map(cbs, cbe);
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user