Skip to content

Commit

Permalink
gpu?
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 16, 2023
1 parent 3c73246 commit 819788f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions website/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ console.log('✔ `/rss.xml`')
const browser = await puppeteer.launch(
process.env.AWS_EXECUTION_ENV
? {
args: chromium.args,
// See: <https://github.com/Sparticuz/chromium/issues/85#issuecomment-1527692751>
args: [...chromium.args, '--disable-gpu'],
defaultViewport: chromium.defaultViewport,
executablePath: await chromium.executablePath(),
headless: chromium.headless
Expand Down Expand Up @@ -382,12 +383,15 @@ await pAll(
)

const pages = await browser.pages()
console.log('are there still pages?', pages)
console.log('are there still pages: 1?', pages)

for (const page of pages) {
// eslint-disable-next-line no-await-in-loop
await page.close()
}

console.log('are there still pages: 2?', pages)

await browser.close()

console.log('✔ OG images')

0 comments on commit 819788f

Please sign in to comment.