From bfe23034c70a1f71f91b5595418eac3b31f2c08d Mon Sep 17 00:00:00 2001 From: matthew Date: Sun, 23 Oct 2022 21:45:50 +0400 Subject: [PATCH] try to fix fetcher --- searching-front/services/domain-watcher.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/searching-front/services/domain-watcher.ts b/searching-front/services/domain-watcher.ts index 36d2103..d4cd4be 100644 --- a/searching-front/services/domain-watcher.ts +++ b/searching-front/services/domain-watcher.ts @@ -51,7 +51,7 @@ const wait = (time: number) => new Promise((resolve) => setTimeout(() => resolve const searchNFTItems = async ({ limit, offset }: SearchNFTItemsParams) => { try { - console.log(`Start search limit:${limit}, offset:${offset}`) + console.log(`Start search part:${offset}`) await wait(1) const { data } = await axios.get( `https://tonapi.io/v1/nft/searchItems?collection=EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz&include_on_sale=false&limit=${limit}&offset=${offset}`, @@ -68,7 +68,7 @@ const searchNFTItems = async ({ limit, offset }: SearchNFTItemsParams) => { } } -const portion = 1000 +const portion = 500 const fetchTonSite = async (url: string) => { try { @@ -160,6 +160,8 @@ const main = async () => setTimeout(() => { resolve(true) }, 3000) + }).catch(e=>{ + console.log('Domain watcher error:\n',e) }) export default main