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); // await createMarketAlertEmailTemplate(); await sendBulkEmail(marketAlerts); // console.log(marketAlerts); process.exit(); } catch (e) { console.log("NOTIFICATION SERVICE: could not send notifications reason: ", e); } } processNotifications();