Send templated bulk email, and remember notifed marketalerts

This commit is contained in:
Nedim Uka
2019-06-28 18:06:19 +02:00
parent b3baffe174
commit 96e9da1fb1
7 changed files with 98 additions and 61 deletions

View File

@@ -19,7 +19,7 @@ async function crawlAll() {
try {
const marketAlertsFromDb = await allMarketAlerts();
const marketAlertsFromDb = await allMarketAlerts(true);
console.log("CRAWLER SERVICE: number of existing MarketAlerts from db: " + marketAlertsFromDb.length);
const marketAlerts = [];
@@ -37,7 +37,9 @@ async function crawlAll() {
municipality: result.municipality,
region: result.region,
gardenSize: isNaN(result.gardenSize) ? 0 : result.gardenSize,
realEstateType: result.realEstateType
realEstateType: result.realEstateType,
title: result.title,
notified: false
})
}
console.log("CRAWLER SERVICE: Number of crawler results: " + marketAlerts.length);