(node:85266) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
I get this warning using the plugin. Mongo DB 4 is used. Can you please add { useNewUrlParser: true } to the connection options?
I have the same issue.
I use MongoDB string to connect agenda like below:
const mongo = 'mongodb://0.0.0.0:2707/'
const agenda = new Agenda({ db: { address: mongo }, processEvery: '30 seconds' });
the output of mongo is same as above issue.
It looks like you can pass them in an object assigned to Agenda.db.options like so:
const agenda = new Agenda({
db: {
address: mongoConnectionString,
options: {
useNewUrlParser: true,
},
},
});
The option , useNewUrlParser: true needs to be placed here: https://github.com/agenda/agenda/blob/db30391881a887cc3da25b4828ab6ebe59d7fc63/lib/agenda/database.js#L29
Hey @simison, @OmgImAlexis, @rschmukler, @vkarpov15 - this is a simple PR. It's OK if you can no longer commit to the project, and it would be nice to enable others to accept PRs.
I've created a new PR for this, all tests have passed it just needs to be reviewed #806
Most helpful comment
It looks like you can pass them in an object assigned to
Agenda.db.optionslike so: