Skip to content

Commit

Permalink
Minimizar consumo de recursos
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Aug 30, 2022
1 parent 2630976 commit 6515138
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion backend/src/libs/wbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,37 @@ export const initWbot = async (whatsapp: Whatsapp): Promise<Session> => {
session: sessionCfg,
authStrategy: new LocalAuth({ clientId: 'bd_' + whatsapp.id }),
puppeteer: {
args: ['--no-sandbox', '--disable-setuid-sandbox'],
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--log-level=3',
'--no-default-browser-check',
'--disable-site-isolation-trials',
'--no-experiments',
'--ignore-gpu-blacklist',
'--ignore-certificate-errors',
'--ignore-certificate-errors-spki-list',
'--disable-gpu',
'--disable-extensions',
'--disable-default-apps',
'--enable-features=NetworkService',
'--disable-setuid-sandbox',
'--no-sandbox',
'--disable-webgl',
'--disable-threaded-animation',
'--disable-threaded-scrolling',
'--disable-in-process-stack-traces',
'--disable-histogram-customizer',
'--disable-gl-extensions',
'--disable-composited-antialiasing',
'--disable-canvas-aa',
'--disable-3d-apis',
'--disable-accelerated-2d-canvas',
'--disable-accelerated-jpeg-decoding',
'--disable-accelerated-mjpeg-decode',
'--disable-app-list-dismiss-on-blur',
'--disable-accelerated-video-decode'
],
executablePath: process.env.CHROME_BIN || undefined
},
});
Expand Down

0 comments on commit 6515138

Please sign in to comment.