fix: increase twitter-handler timeout to 60 seconds

This commit is contained in:
Hongbo Wu
2023-05-24 18:00:49 +08:00
parent df7e1fd269
commit 8ddde61285
2 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,9 @@
import { ContentHandler, PreHandleResult } from '../content-handler'
import axios from 'axios'
import { DateTime } from 'luxon'
import _ from 'underscore'
import { truncate } from 'lodash'
import { DateTime } from 'luxon'
import { Browser, BrowserContext } from 'puppeteer-core'
import _ from 'underscore'
import { ContentHandler, PreHandleResult } from '../content-handler'
interface TweetIncludes {
users: {
@ -219,6 +219,7 @@ const getTweetIds = async (
await page.goto(pageURL, {
waitUntil: 'networkidle0',
timeout: 60000, // 60 seconds
})
return (await page.evaluate(async (author) => {

View File

@ -389,9 +389,9 @@ async function fetchContent(req, res) {
await context.close();
}
console.info(`parse-page`, logRecord);
}
return res.sendStatus(200);
res.sendStatus(200);
}
}
function validateUrlString(url) {