mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-29 17:22:29 +00:00
Testing
This commit is contained in:
parent
03ef4fe5ff
commit
d60f8d66a2
@ -179,7 +179,7 @@ class OrbitClient {
|
|||||||
// console.log("posting...")
|
// console.log("posting...")
|
||||||
message = this._createMessage(channel, password, operation, key, value);
|
message = this._createMessage(channel, password, operation, key, value);
|
||||||
res = await(this._pubsub.publish(channel, message.hash, message.seq));
|
res = await(this._pubsub.publish(channel, message.hash, message.seq));
|
||||||
// if(!res) console.log("retry")
|
// if(!res) console.log("retry", message)
|
||||||
}
|
}
|
||||||
// console.log("posted")
|
// console.log("posted")
|
||||||
return message.Hash;
|
return message.Hash;
|
||||||
@ -211,7 +211,6 @@ class OrbitClient {
|
|||||||
// this.client = this._pubsub._client;
|
// this.client = this._pubsub._client;
|
||||||
// this.user = this.client.info.user;
|
// this.user = this.client.info.user;
|
||||||
this.user = { id: 'hello' }
|
this.user = { id: 'hello' }
|
||||||
console.log("Connected to redis")
|
|
||||||
// this.network = {
|
// this.network = {
|
||||||
// id: this.client.info.networkId,
|
// id: this.client.info.networkId,
|
||||||
// name: this.client.info.name,
|
// name: this.client.info.name,
|
||||||
|
@ -40,13 +40,13 @@ class PubSub {
|
|||||||
this.publishQueue.splice(0, 0, { hash: message.Hash, callback: resolve });
|
this.publishQueue.splice(0, 0, { hash: message.Hash, callback: resolve });
|
||||||
this.client2.publish(hash, JSON.stringify({ hash: message.Hash, seq: seq }));
|
this.client2.publish(hash, JSON.stringify({ hash: message.Hash, seq: seq }));
|
||||||
} else {
|
} else {
|
||||||
console.log("too early")
|
// console.log("too early")
|
||||||
// resolve(false);
|
// resolve(false);
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.publishQueue.pop();
|
// this.publishQueue.pop();
|
||||||
resolve(false);
|
// resolve(false);
|
||||||
}, 2000)
|
// }, 200)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user