Fetch multiple unsent messages at once to speed up delivery

This commit is contained in:
Andris Reinman 2016-05-25 18:01:39 +03:00
parent 9a5d723663
commit f29a8a1b67
9 changed files with 184 additions and 77 deletions

View file

@ -212,7 +212,6 @@ router.get('/view/:id', passport.csrfProtection, (req, res) => {
list.imports = imports.map((entry, i) => {
entry.index = i + 1;
entry.processed = humanize.numberFormat(entry.processed, 0);
entry.importType = entry.type === 1 ? 'Subscribe' : 'Unsubscribe';
switch (entry.status) {
case 0:
@ -234,6 +233,7 @@ router.get('/view/:id', passport.csrfProtection, (req, res) => {
entry.created = entry.created && entry.created.toISOString();
entry.finished = entry.finished && entry.finished.toISOString();
entry.updated = entry.processed - entry.new;
entry.processed = humanize.numberFormat(entry.processed, 0);
return entry;
});
list.csrfToken = req.csrfToken();