Changed logic for checkup.For testing.

This commit is contained in:
Naida Vatric
2020-01-24 01:01:10 +01:00
parent b2c102bc1a
commit 40509d2836
6 changed files with 37 additions and 8 deletions

View File

@@ -8,10 +8,12 @@ const forceSSL = require("./app/helpers/forceSSL");
const {
APP_PORT,
CRAWLER_INTERVAL,
STOP_CRAWLER
STOP_CRAWLER,
CHECK_UP_DAYS
} = require("./app/config/appConfig");
const routes = require("./app/routes");
const { crawlAll } = require("./app/crawler/crawl");
const { checkUpNotify } = require("./app/services/notificationService");
const {
notifyForNewRealEstates
} = require("./app/services/notificationService");
@@ -45,4 +47,7 @@ const crawl = () => {
});
}
};
setInterval(crawl, CRAWLER_INTERVAL * 1000);
setInterval(checkUpNotify, CHECK_UP_DAYS * 24 * 60 * 60 * 1000);