chilts / mongodb-queue

Message queues which uses MongoDB.
209 stars 91 forks source link

Using mongdb nodejs driver 4 #42

Open eugeniop opened 3 years ago

eugeniop commented 3 years ago

It looks like in the new driver, the interface of results for an insertMany operation has changed:

https://github.com/chilts/mongodb-queue/blob/4a10a755acd5ef7ea256494ba40f89e18c50c8d1/mongodb-queue.js#L97

Instead of an array, it is an object. This works:

callback(null, '' + results.insertedIds["0"]._id)
mhassan1 commented 2 years ago

I've just published fork mongodb-queue-up with support for mongodb@4.

FiveOFive commented 2 years ago

Support for mongo nodejs driver 4 would be great. @chilts - are you around to take a look at the pull request for this? - https://github.com/chilts/mongodb-queue/pull/45