Comparing version 1.0.6 to 1.0.7
@@ -40,3 +40,2 @@ var util = require('util') | ||
tailable: true, | ||
//awaitdata: true, | ||
numberOfRetries: -1, | ||
@@ -79,3 +78,3 @@ tailableRetryInterval: Channel.TAILABLE_RETRY_INTERVAL | ||
return self.client.ping().then(function() { | ||
return q.nfcall(self.db.collection('channels').update, { client: self.client.id, channel: self.name }, { $set: { ping: new Date() }}); | ||
return q.ninvoke(self.db.collection('channels'), 'update', { client: self.client.id, channel: self.name }, { $set: { ping: new Date() }}); | ||
}).nodeify(cb); | ||
@@ -131,2 +130,5 @@ } | ||
} | ||
Channel.find = function(db, namespace, channel, cb) { | ||
return q.ninvoke(db.collection('channels').find({ channel: channel, ns: namespace }), 'toArray').nodeify(cb); | ||
} | ||
Channel.count = function(db, namespace, channel, cb) { | ||
@@ -133,0 +135,0 @@ return q.ninvoke(db.collection('channels').find({ channel: channel, ns: namespace }), 'count').nodeify(cb); |
@@ -12,3 +12,3 @@ var q = require('q') | ||
Client.prototype.ping = function(cb) { | ||
return q.nfcall(this.db.collection('clients').update, { _id: this.id }, { $set: { ping: new Date() }}).nodeify(cb); | ||
return q.ninvoke(this.db.collection('clients'), 'update', { _id: this.id }, { $set: { ping: new Date() }}).nodeify(cb); | ||
} | ||
@@ -64,3 +64,4 @@ Client.prototype.channel = Client.prototype.join = function(name, lastMessage) { | ||
exports.send = Channel.send; | ||
exports.find = Channel.find; | ||
exports.count = Channel.count; | ||
{ | ||
"name": "vubsub", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Pub/Sub for Node.js and MongoDB", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/vivocha/vubsub", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10153
193