Send notification email

This commit is contained in:
Nedim Uka
2019-06-27 17:29:57 +02:00
parent 208faa08df
commit b3baffe174
3 changed files with 101 additions and 10 deletions

View File

@@ -2,18 +2,21 @@
const Promise = require("bluebird");
const db = require("../models/index");
const { allMarketAlerts } = require('../helpers/db/dbHelper');
const { createMarketAlertEmailTemplate, sendBulkEmail } = require('../helpers/awsEmail');
async function processNotifications() {
try {
const marketAlerts = await allMarketAlerts(false);
console.log(marketAlerts);
// await createMarketAlertEmailTemplate();
await sendBulkEmail(marketAlerts);
// console.log(marketAlerts);
process.exit();
} catch (e) {
console.log("NOTIFICATION SERVICE: could not send notifications reason: ", e);
}
}
processNotifications();
processNotifications();