summaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-11-14 19:38:26 +0300
committereug-vs <eug-vs@keemail.me>2020-11-14 19:38:26 +0300
commit33e640f1e8654fcfc8102b43449c79bcb4d5ddff (patch)
tree3936700d729067c998569adcb566ef5b47a1dffc /src/handlers
parentfb8cdd4bce1c549135b435473b5ca30e77efa969 (diff)
downloadbsu-fantom-33e640f1e8654fcfc8102b43449c79bcb4d5ddff.tar.gz
build: setup docker correctly
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/index.js2
-rw-r--r--src/handlers/launchUserSession.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/handlers/index.js b/src/handlers/index.js
index e6f84df..18946fc 100644
--- a/src/handlers/index.js
+++ b/src/handlers/index.js
@@ -8,7 +8,7 @@ const { clickElementBySelector } = require('./utils.js');
const { EDUFPMI_URL, NODE_ENV, HEADLESS } = process.env;
// Always run headless in production, but allow configuring for development
-const headless = NODE_ENV === 'production' || HEADLESS || false;
+const headless = NODE_ENV === 'production' || HEADLESS;
const handleJobAsUser = async (job, user) => {
diff --git a/src/handlers/launchUserSession.js b/src/handlers/launchUserSession.js
index 58dde62..44f2193 100644
--- a/src/handlers/launchUserSession.js
+++ b/src/handlers/launchUserSession.js
@@ -3,8 +3,10 @@ const { clickElementBySelector } = require('./utils.js');
const { EDUFPMI_URL } = process.env;
-const launchUserSession = (user, headless = true) => puppeteer.launch({ headless })
- .then(async browser => {
+const launchUserSession = (user, headless = true) => puppeteer.launch({
+ headless,
+ args: ['--no-sandbox']
+}).then(async browser => {
const { username, password } = user;
const page = await browser.newPage();