|
|
@ -44,14 +44,10 @@ async function test() {
|
|
|
|
await new Promise(resolve => {
|
|
|
|
await new Promise(resolve => {
|
|
|
|
|
|
|
|
|
|
|
|
const timeout = setTimeout(() => {
|
|
|
|
const timeout = setTimeout(() => {
|
|
|
|
stats.failures++
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
writeToLog(country.url, `Timeout exceeded`, item.url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resolve()
|
|
|
|
resolve()
|
|
|
|
}, config.timeout * 1000)
|
|
|
|
}, config.timeout * 1000)
|
|
|
|
|
|
|
|
|
|
|
|
ffmpeg(item.url, { timeout: config.timeout }).ffprobe((err) => {
|
|
|
|
ffmpeg(item.url).ffprobe((err) => {
|
|
|
|
|
|
|
|
|
|
|
|
if(err) {
|
|
|
|
if(err) {
|
|
|
|
const message = parseMessage(err, item.url)
|
|
|
|
const message = parseMessage(err, item.url)
|
|
|
@ -59,7 +55,6 @@ async function test() {
|
|
|
|
stats.failures++
|
|
|
|
stats.failures++
|
|
|
|
|
|
|
|
|
|
|
|
writeToLog(country.url, message, item.url)
|
|
|
|
writeToLog(country.url, message, item.url)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
clearTimeout(timeout)
|
|
|
|
clearTimeout(timeout)
|
|
|
|