add shorter timeout

This commit is contained in:
keyan 2021-11-23 12:35:10 -06:00
parent 70b83cf496
commit 48509ac819

View File

@ -3,7 +3,7 @@
const Pageres = require('pageres') const Pageres = require('pageres')
async function captureUrl () { async function captureUrl () {
const streams = await new Pageres({ crop: true }) const streams = await new Pageres({ crop: true, timeout: 5 })
.src(process.argv[2], ['600x314']) .src(process.argv[2], ['600x314'])
.run() .run()
process.stdout.write(streams[0], () => process.exit(0)) process.stdout.write(streams[0], () => process.exit(0))