remove all logging noise
This commit is contained in:
@@ -4,8 +4,6 @@ const db = require("../models/index");
|
||||
const { allMarketAlerts } = require("../helpers/db/dbHelper");
|
||||
|
||||
async function crawlAll() {
|
||||
console.log("CRAWLER SERVICE: crawlAll");
|
||||
|
||||
try {
|
||||
const marketAlertsFromDb = await allMarketAlerts(true);
|
||||
const hrefs = [];
|
||||
@@ -18,8 +16,6 @@ async function crawlAll() {
|
||||
hrefs[marketAlert.request].push(marketAlert.url);
|
||||
});
|
||||
|
||||
console.log("CRAWLER SERVICE: GLOBAL HREFS");
|
||||
console.log(hrefs);
|
||||
const olxCrawler = new OlxCrawler(hrefs);
|
||||
|
||||
const crawlers = [olxCrawler];
|
||||
@@ -30,11 +26,6 @@ async function crawlAll() {
|
||||
try {
|
||||
const marketAlertsFromDb = await allMarketAlerts(false, true);
|
||||
|
||||
console.log(
|
||||
"CRAWLER SERVICE: number of existing MarketAlerts from db: " +
|
||||
marketAlertsFromDb.length
|
||||
);
|
||||
|
||||
const marketAlerts = [];
|
||||
const mergedResults = [].concat.apply([], results);
|
||||
|
||||
@@ -56,9 +47,6 @@ async function crawlAll() {
|
||||
hasLocation: result.hasLocation
|
||||
});
|
||||
}
|
||||
console.log(
|
||||
"CRAWLER SERVICE: Number of crawler results: " + marketAlerts.length
|
||||
);
|
||||
|
||||
try {
|
||||
const filteredMarketAlerts = marketAlerts.filter(
|
||||
@@ -67,10 +55,6 @@ async function crawlAll() {
|
||||
return elem.url === url && elem.request === request;
|
||||
})
|
||||
);
|
||||
console.log(
|
||||
"CRAWLER SERVICE: Number of new crawler results: " +
|
||||
filteredMarketAlerts.length
|
||||
);
|
||||
|
||||
await db.MarketAlert.bulkCreate(filteredMarketAlerts);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user