Send notification email
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user