Debug
This commit is contained in:
3
index.js
3
index.js
@@ -4,6 +4,7 @@ const bodyParser = require("body-parser");
|
||||
const layout = require("express-layout");
|
||||
const compression = require("compression");
|
||||
const forceSSL = require("./app/helpers/forceSSL");
|
||||
const { logDebug } = require("./app/helpers/log");
|
||||
|
||||
const {
|
||||
APP_PORT,
|
||||
@@ -38,9 +39,11 @@ app.listen(APP_PORT, () =>
|
||||
|
||||
let crawlerRunning = STOP_CRAWLER;
|
||||
const crawl = () => {
|
||||
logDebug("Crawl start");
|
||||
if (!crawlerRunning) {
|
||||
crawlerRunning = true;
|
||||
crawlAll().then(newRealEstates => {
|
||||
logDebug("crawlAll done, new real estate len: ", newRealEstates.length);
|
||||
crawlerRunning = false;
|
||||
notifyForNewRealEstates(newRealEstates);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user