mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-27 08:22:31 +00:00
Tweaks
This commit is contained in:
parent
aa619a81c8
commit
085cf4775f
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user