Added support for throttling

This commit is contained in:
Andris Reinman 2016-07-05 19:31:57 +03:00
parent 10bd4614ef
commit cf0042c50a
9 changed files with 67 additions and 20 deletions

View file

@ -430,12 +430,12 @@ let sendLoop = () => {
});
};
setImmediate(trySend);
setImmediate(getNext);
setImmediate(() => mailer.transport.checkThrottling(getNext));
});
});
};
mailer.transport.on('idle', getNext);
mailer.transport.on('idle', () => mailer.transport.checkThrottling(getNext));
});
};