Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use iobackends to send status messages. #145

Closed
wants to merge 13 commits into from
Closed
Prev Previous commit
Next Next commit
use tmpId middleware so Caspa sees new messages.
pardo-bsso committed Mar 2, 2014
commit 98a2634b649a5deb5fa479b58a4149f93ed9c53f
1 change: 1 addition & 0 deletions backends.js
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ module.exports = function (db) {
},
mostomessages: {
redis: true,
use: [middleware.tmpId],
mongo: {
db: db,
collection: collections.Mostomessages,
3 changes: 3 additions & 0 deletions drivers/status/pubsub.js
Original file line number Diff line number Diff line change
@@ -206,8 +206,11 @@ CaspaDriver.prototype.publishMessage = function(code, message, description, refe
return existing;
}


status._id = uuid.v4();
status._tmpid = true;
status = MostoMessagesCollection.create(status);
status.save();
return status;
};