pass new real estates to the notification service
This commit is contained in:
6
index.js
6
index.js
@@ -1,5 +1,3 @@
|
||||
require("dotenv").config();
|
||||
|
||||
const express = require("express");
|
||||
const path = require("path");
|
||||
const bodyParser = require("body-parser");
|
||||
@@ -13,6 +11,9 @@ const {
|
||||
} = require("./app/config/appConfig");
|
||||
const routes = require("./app/routes");
|
||||
const { crawlAll } = require("./app/crawler/crawl");
|
||||
const {
|
||||
notifyForNewRealEstates
|
||||
} = require("./app/services/notificationService");
|
||||
|
||||
const app = express();
|
||||
|
||||
@@ -38,6 +39,7 @@ const crawl = () => {
|
||||
crawlerRunning = true;
|
||||
crawlAll().then(newRealEstates => {
|
||||
crawlerRunning = false;
|
||||
notifyForNewRealEstates(newRealEstates);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user