Skip to content

Commit

Permalink
Merge pull request #214 from nzzdev/release-10.0.3
Browse files Browse the repository at this point in the history
Release 10.0.3
  • Loading branch information
romankaravia committed Sep 18, 2020
2 parents 372682e + 2fab206 commit 37f0202
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer>
<p>Q is developed by <a href="https://twitter.com/NZZEdTech">NZZ Editorial Tech</a> and <a href="https://twitter.com/NZZVisuals">NZZ Visuals</a> and licensed under <a href="https://opensource.org/licenses/MIT">MIT</a>.</p>
<p>Q is developed by <a href="https://twitter.com/NZZEditoTech">NZZ Editorial Tech</a> and <a href="https://twitter.com/NZZVisuals">NZZ Visuals</a> and licensed under <a href="https://opensource.org/licenses/MIT">MIT</a>.</p>
<p>
The source is available on Github:
<a href="https://github.com/nzzdev/Q-server">Q server</a>,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nzz/q-server",
"version": "10.0.2",
"version": "10.0.3",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
20 changes: 12 additions & 8 deletions plugins/screenshot/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ const puppeteer = require("puppeteer");
const fetch = require("node-fetch");

// start a chromium process here
let browserPromise = puppeteer.launch({
args: [
"--no-sandbox",
"--disable-dev-shm-usage",
"--font-render-hinting=none"
]
});
let browserPromise = startChromiumProcess();

function startChromiumProcess() {
return puppeteer.launch({
args: [
"--no-sandbox",
"--disable-dev-shm-usage",
"--font-render-hinting=none",
],
});
}

// fetches assets and returns a concatenated string containing everything fetched
async function getConcatenatedAssets(assets, userAgent) {
Expand Down Expand Up @@ -51,7 +55,7 @@ async function getFinishedPage(
try {
page = await browser.newPage();
} catch (err) {
browserPromise = puppeteer.launch({ args: ["--no-sandbox"] });
browserPromise = startChromiumProcess();
browser = await browserPromise;
page = await browser.newPage();
}
Expand Down

0 comments on commit 37f0202

Please sign in to comment.