Compare commits

...

5 Commits

Author SHA1 Message Date
matthew 26cd395924 fix proxy url 2 years ago
matthew 34a4dfc1ee open flux 2 years ago
matthew ceccd9a33f open flux 2 years ago
matthew 27baf93bc8 try to fix watcher 2 years ago
matthew f6617732a5 try to fix watcher 2 years ago
  1. 4
      docker-compose.yml
  2. 1
      searching-front/services/domain-watcher.ts
  3. 2
      searching-front/services/helpers.ts
  4. 10
      searching-front/services/main.ts

4
docker-compose.yml

@ -19,8 +19,8 @@ services:
# - 9200:9200 # - 9200:9200
influxdb: influxdb:
image: influxdb:2.4-alpine image: influxdb:2.4-alpine
# ports: ports:
# - '8086:8086' - '8086:8086'
volumes: volumes:
- influxdb-storage:/var/lib/influxdb - influxdb-storage:/var/lib/influxdb
env_file: ./searching-front/.env.local env_file: ./searching-front/.env.local

1
searching-front/services/domain-watcher.ts

@ -75,6 +75,7 @@ const fetchTonSite = async (url: string) => {
const urlToFetch = `http://${url}/` const urlToFetch = `http://${url}/`
const response = await axios.get(urlToFetch, { const response = await axios.get(urlToFetch, {
proxy: getTonProxy(), proxy: getTonProxy(),
timeout: 30000
}) })
if (!response.data) { if (!response.data) {
console.log("Error fetch") console.log("Error fetch")

2
searching-front/services/helpers.ts

@ -1,4 +1,4 @@
export const getTonProxy = () => ({ export const getTonProxy = () => ({
host: "62.84.115.133", host: process.env.TON_PROXY_DOMAIN || "in3.ton.org",
port: 8080, port: 8080,
}) })

10
searching-front/services/main.ts

@ -10,11 +10,11 @@ const run = async()=>{
console.time('watcher') console.time('watcher')
await domainWatcher(); await domainWatcher();
console.timeEnd('watcher') console.timeEnd('watcher')
// influx() influx()
// console.log('Start parser'); console.log('Start parser');
// console.time('watcher'); console.time('watcher');
// await parser(); await parser();
// console.timeEnd('watcher'); console.timeEnd('watcher');
} }

Loading…
Cancel
Save