mcollina / mqemitter-mongodb

MongoDB based MQEmitter
MIT License
18 stars 10 forks source link

Third parameter to `find()` must be a callback or undefined #7

Closed kareha closed 4 years ago

kareha commented 6 years ago

In mqemitter-mongodb.js Line 86-93

Paramters of .find() are: (query, options, callback)

Please check if you can change your code from:

    that._stream = that._collection.find({
      _id: { $gt: that._lastId }
    }, {}, {
      tailable: true,
      timeout: false,
      awaitData: true,
      numberOfRetries: -1
    })

to:

    that._stream = that._collection.find({
      _id: { $gt: that._lastId }
    }, {
      tailable: true,
      timeout: false,
      awaitData: true,
      numberOfRetries: -1
    })

Thx

mcollina commented 6 years ago

would you like to send a PR? What problem is this creating? Il giorno gio 12 lug 2018 alle 16:38 kareha notifications@github.com ha scritto:

In mqemitter-mongodb.js Line 86-93

Paramter of .find() are: (query, options, callback)

Please check if you can change your code to:

that._stream = that._collection.find({
  _id: { $gt: that._lastId }
}, {
  tailable: true,
  timeout: false,
  awaitData: true,
  numberOfRetries: -1
})

Thx

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mcollina/mqemitter-mongodb/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/AADL4_J2RbbdpQ2BjdzvWguniEGLYMy0ks5uF22BgaJpZM4VNQf3 .

robertsLando commented 4 years ago

@mcollina This can be closed