Decreasing screenshot quality to decrease time taken for screenshot

This commit is contained in:
Collin Duncan 2024-04-11 09:48:36 +02:00
parent 327065f3e3
commit 45bc15eee5
No known key found for this signature in database

View file

@ -119,8 +119,9 @@ export class BaanReserverenService {
private async handleError() { private async handleError() {
await this.page await this.page
.screenshot({ .screenshot({
type: 'png', type: 'jpeg',
path: `./${Date.now()}_error-screenshot.png`, path: `./${Date.now()}_error-screenshot.jpeg`,
quality: 50,
}) })
.catch((reason: any) => .catch((reason: any) =>
this.loggerService.warn('Failed to take screenshot', { reason }), this.loggerService.warn('Failed to take screenshot', { reason }),