From ecb98e114bc461f439386ed8d914e4617746570d Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 14 Nov 2020 17:41:39 +0300 Subject: feat: attend conference on job --- src/handlers/attendConference.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/handlers/attendConference.js') diff --git a/src/handlers/attendConference.js b/src/handlers/attendConference.js index 54d6479..8f5c53f 100644 --- a/src/handlers/attendConference.js +++ b/src/handlers/attendConference.js @@ -1,13 +1,14 @@ const { clickElementByXPath } = require('./utils.js'); -const CONFERENCE_DURATION = 1000 * 60 * 80; // 80 minutes +const CONFERENCE_DURATION = process.env.NODE_ENV === 'production' + ? 1000 * 60 * 80 // 80 minutes + : 5000; const attendConference = async (page, onJoin) => { // Join as "Listen only" await clickElementByXPath(page, '//span[contains(text(),"Listen only")]'); if (typeof(onJoin) === 'function') onJoin(); - console.log('Joined the conference'); // Wait 5 seconds await page.waitForTimeout(CONFERENCE_DURATION); -- cgit v1.2.3