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

Support for node-mongodb-native2 #6

Closed
ozomer opened this issue Sep 8, 2015 · 3 comments
Closed

Support for node-mongodb-native2 #6

ozomer opened this issue Sep 8, 2015 · 3 comments

Comments

@ozomer
Copy link

ozomer commented Sep 8, 2015

There were few changes in the mongodb npm package in version 2 (the current "default" version is 2.0.42).
The insert command is marked as deprecated, and its callback gets a different result object:
http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#~insertWriteOpResult

mongodb-queue.js fails at line 78 (Queue.add function):

self.col.insert(msg, function(err, results) {
    if (err) return callback(err)
    callback(null, '' + results[0]._id)
})

results[0] is undefined...

ozomer referenced this issue in chriswitko/mongodb-queue Sep 8, 2015
@chilts
Copy link
Owner

chilts commented Nov 12, 2015

Is this what you're looking for #5 ?

That PR updates to v2 of the driver.

@ozomer
Copy link
Author

ozomer commented Nov 12, 2015

Yes, but we already switched to RabbitMQ :)

@chilts
Copy link
Owner

chilts commented Nov 12, 2015

That's cool, it will probably serve you better for big sites anyway. This is just for those little sites that are already using Mongo. Thanks for your initial issue anyway. :)

@chilts chilts closed this as completed Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants