This commit is contained in:
haad 2016-02-11 15:26:41 +01:00
parent aa619a81c8
commit 085cf4775f
2 changed files with 3 additions and 9 deletions

View File

@ -39,14 +39,12 @@ let run = (async(() => {
queriesPerSecond = 0; queriesPerSecond = 0;
}, 1000); }, 1000);
setInterval(async(() => { while(true) {
// while(true) {
channel.add(id + totalQueries); channel.add(id + totalQueries);
totalQueries ++; totalQueries ++;
lastTenSeconds ++; lastTenSeconds ++;
queriesPerSecond ++; queriesPerSecond ++;
// } }
}), 100);
} catch(e) { } catch(e) {
console.error("error:", e); console.error("error:", e);

View File

@ -30,11 +30,7 @@ class OrbitClient {
channel(hash, password) { channel(hash, password) {
if(password === undefined) password = ''; if(password === undefined) password = '';
await(this._pubsub.subscribe(hash, password, async((hash, message, seq) => { await(this._pubsub.subscribe(hash, password));
let m = await(Aggregator._fetchOne(this.ipfs, message, password));
// console.log(">", m.key, m.seq, m.Payload);
})));
// await(this._pubsub.subscribe(hash, password));
// this._pubsub.subscribe(hash, password, async((hash, message, seq) => { // this._pubsub.subscribe(hash, password, async((hash, message, seq) => {
// let m = Aggregator._fetchOne(this.ipfs, message, password); // let m = Aggregator._fetchOne(this.ipfs, message, password);
// console.log(">", message); // console.log(">", message);