fix(KBService): remove unnecessary skip variable in file processing logic
All checks were successful
GBCI / build (push) Successful in 33s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-05-22 11:00:16 -03:00
parent b6ba7d5a3d
commit 3abbec63a7

View file

@ -1020,7 +1020,19 @@ export class KBService implements IGBKBService {
async getFreshPage(browser, url) {
if (!browser || browser.isConnected() === false) {
browser = await puppeteer.launch({ headless: false });
let args = [
'--check-for-update-interval=2592000',
'--disable-accelerated-2d-canvas',
'--disable-dev-shm-usage',
'--disable-features=site-per-process',
'--disable-gpu',
'--no-first-run',
'--no-sandbox',
'--no-default-browser-check'
];
browser = await puppeteer.launch({ headless: false, args: args });
}
const page = await browser.newPage();
try {
@ -1063,8 +1075,18 @@ export class KBService implements IGBKBService {
let packagePath = GBUtil.getGBAIPath(min.botId, `gbot`);
const directoryPath = path.join(process.env.PWD, 'work', packagePath, 'Website');
fs.rm(directoryPath, { recursive: true, force: true });
let args = [
'--check-for-update-interval=2592000',
'--disable-accelerated-2d-canvas',
'--disable-dev-shm-usage',
'--disable-features=site-per-process',
'--disable-gpu',
'--no-first-run',
'--no-sandbox',
'--no-default-browser-check'
];
let browser = await puppeteer.launch({ headless: false });
let browser = await puppeteer.launch({ headless: false , args});
const page = await this.getFreshPage(browser, website);
let logo = await this.getLogoByPage(min, page);