From c48056dffbdf7fde3c210107904cf79df8452ea3 Mon Sep 17 00:00:00 2001
From: matthew
Date: Tue, 4 Oct 2022 22:44:46 +0400
Subject: [PATCH] add gtag
---
searching-front/pages/_document.tsx | 10 +++++++++-
searching-front/services/main.ts | 5 +++++
searching-front/services/modules/parser/index.ts | 2 --
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/searching-front/pages/_document.tsx b/searching-front/pages/_document.tsx
index 64e1ef7..a5064a3 100644
--- a/searching-front/pages/_document.tsx
+++ b/searching-front/pages/_document.tsx
@@ -12,6 +12,8 @@ class MyDocument extends Document {
+
+
diff --git a/searching-front/services/main.ts b/searching-front/services/main.ts
index e657a5e..17508d5 100644
--- a/searching-front/services/main.ts
+++ b/searching-front/services/main.ts
@@ -18,5 +18,10 @@ const hour = 60 * minute;
run();
setInterval(()=>{
+ console.log(new Date(), 'Health check');
+},hour)
+
+setInterval(()=>{
+ console.log(new Date(), 'Cron parse start')
run()
},3 * hour)
\ No newline at end of file
diff --git a/searching-front/services/modules/parser/index.ts b/searching-front/services/modules/parser/index.ts
index 41ae10d..446de53 100644
--- a/searching-front/services/modules/parser/index.ts
+++ b/searching-front/services/modules/parser/index.ts
@@ -16,7 +16,6 @@ interface ParseUrlResult {
}
const isInnerLink = (link: string) => {
- console.log(link)
return link.startsWith("/")
}
@@ -44,7 +43,6 @@ class Parser {
// собираем все ссылки и складываем их в сэт для дальнейшей обработки
dom.window.document.querySelectorAll("a").forEach(({ href }) => {
- console.log(href)
if (isInnerLink(href)) {
const url = new URL("ton://a.ton" + href)
if (!isInvalidLink(url.pathname)) {