From d60f8d66a23b47080e38cd9ca9973f0d0824cfd2 Mon Sep 17 00:00:00 2001 From: haad Date: Thu, 11 Feb 2016 09:20:34 +0100 Subject: [PATCH] Testing --- src/OrbitClient.js | 5 ++--- src/PubSub.js | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/OrbitClient.js b/src/OrbitClient.js index 9e3e8fb..a446c39 100644 --- a/src/OrbitClient.js +++ b/src/OrbitClient.js @@ -176,10 +176,10 @@ class OrbitClient { _createOperation(channel, password, operation, key, value, data) { let message, res = false; while(!res) { - // console.log("posting...") + // console.log("posting...") message = this._createMessage(channel, password, operation, key, value); res = await(this._pubsub.publish(channel, message.hash, message.seq)); - // if(!res) console.log("retry") + // if(!res) console.log("retry", message) } // console.log("posted") return message.Hash; @@ -211,7 +211,6 @@ class OrbitClient { // this.client = this._pubsub._client; // this.user = this.client.info.user; this.user = { id: 'hello' } - console.log("Connected to redis") // this.network = { // id: this.client.info.networkId, // name: this.client.info.name, diff --git a/src/PubSub.js b/src/PubSub.js index 201c1ce..fc9c5ef 100644 --- a/src/PubSub.js +++ b/src/PubSub.js @@ -40,13 +40,13 @@ class PubSub { this.publishQueue.splice(0, 0, { hash: message.Hash, callback: resolve }); this.client2.publish(hash, JSON.stringify({ hash: message.Hash, seq: seq })); } else { - console.log("too early") + // console.log("too early") // resolve(false); } - setTimeout(() => { - this.publishQueue.pop(); - resolve(false); - }, 2000) + // setTimeout(() => { + // this.publishQueue.pop(); + // resolve(false); + // }, 200) }); }