From 305deb76edc95168c6028137a01011ecd97453e1 Mon Sep 17 00:00:00 2001 From: matthew Date: Sun, 2 Oct 2022 20:51:54 +0400 Subject: [PATCH] add elastic env --- searching-front/services/modules/parser/index.ts | 3 ++- searching-front/services/parser.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/searching-front/services/modules/parser/index.ts b/searching-front/services/modules/parser/index.ts index c321e2e..5ae0b3c 100644 --- a/searching-front/services/modules/parser/index.ts +++ b/searching-front/services/modules/parser/index.ts @@ -28,10 +28,11 @@ class Parser { constructor() {} parseUrl = async (url: string) => { try { + console.log('Send request via ton proxy ', url) const { data, headers } = await axios.get(url,{ proxy: getTonProxy(), }) - + console.log('Success response from ', url) const contentType = headers["content-type"].toLocaleLowerCase() console.log(contentType) if (!contentType.startsWith('text/html')) { diff --git a/searching-front/services/parser.ts b/searching-front/services/parser.ts index 8bac8b2..a7497b2 100644 --- a/searching-front/services/parser.ts +++ b/searching-front/services/parser.ts @@ -11,6 +11,7 @@ const findFirstNotIndexed = (subpages: SubPages = {}) => { } const indexWebsite = async (domain: string, path: string, subpages: SubPages = {}) => { + console.log('Start indexWebsite ', domain) if (!subpages[path]) { const url = domain + path; const parseInfo = await Parser.parseUrl(url) @@ -46,6 +47,7 @@ const main = async () => { console.log('Find domains', domains) if (domains) { for (const domain of domains) { + console.log('Update ', domain) await db.nftDomain.update({ where: { address: domain.address }, data: { lastParse: new Date() },