veliovgroup / mail-time

📮 Email queue extending NodeMailer with multi SMTP transports and horizontally scaled applications support

Home Page:https://www.npmjs.com/package/mail-time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Job interval

vjrj opened this issue · comments

commented

Hi there,

I use this package via meter-mailer. Only a small question: it's necessary to do this job every 250ms?
https://github.com/VeliovGroup/Mail-Time/blob/eb326f6710570637c771c0b568cf7bed86acd13b/index.js#L170

or it's safe to update this db job to a greater value?

{
   "_id" : ObjectId("5a2adfa557d79d32b2c55af3"),
   "uid" : "mailTimeQueuesetInterval",
   "delay" : 256,
   "executeAt" : ISODate("2018-01-31T14:59:46.717Z"),
   "isInterval" : true,
   "inProgress" : false
}

Any other way to do it?

TIA,

Hello @theoutlander ,

We would need more information in order to help you. Please, follow our issue template and describe what exactly goes wrong and which versions of mail-time, Node.js and NPM you use.

it's necessary to do this job every 250ms?

Yes, do not worry about it. Yes, it's trigger MongoDB query, but only on indexed fields, so it is cheap ops by default.

Have you noticed high resources consumption?

or it's safe to update this db job to a greater value?

Yes, but you will need to do it on every app launch inside Meteor.startup(() => {/*...*/}) callback

Any other way to do it?

Why?

commented

Yes, I looking why mongo in my dev machine was with high io use (but maybe I have other issues)...
Also for debug some queries is too much noise for me.

Anyway, more details:

$ meteor node -v
v8.8.1
$ grep mailer .meteor/versions
ostrio:mailer@2.1.0
$ grep mail package.json 
    "nodemailer": "^4.4.2",
$ cat .meteor/release 
METEOR@1.6
$ meteor npm -v         
5.4.2

Thanks for the info.

@vjrj temporary switch type option to client. It won't poll DB.
We will change from polling to events, once it will be officially fully supported by DB and driver.

wdyt?

commented

Thanks for the tip (and for sharing you work, I use some other packages of your group here and there)...

commented

@dr-dimitru, but you will need to do it on every app launch inside Meteor.startup(() => {/.../}) callback, should be mentioned, right?