claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.33k stars 90 forks source link

Allow custom timeout for retry function #214

Closed Bricklou closed 2 years ago

Bricklou commented 2 years ago

Add a field in config.json to configure the timeout for retryFunction: https://github.com/claabs/epicgames-freegames-node/blob/8211720629c6033b24db340abddff2dbcaba6f6b/src/common/puppeteer.ts#L122

The problem linked to this request: image

thelukasssheee commented 2 years ago

+1 vote for this feature enhancement.

I am running epicgames-freegames-node docker container on Synology NAS (218+) and was frequently running into 15000ms timeout limit: browser launch did not work after 15000ms. I expected I was having some sort of compatibility issue with the NAS environment...

Turns out, other Docker containers with high CPU prioritity running in parallel were messing drastically with epicgames-freegames-node. This was not so obvious, since the system is "idling" at 30-40% CPU usage with other Dockers active. The expectation - this would be plenty of resources left - was plain out wrong... If I shut the parallel containers down, games are collected as they should be on first try.

Higher timeout value could do the trick.

claabs commented 2 years ago

Added browserLaunchTimeout and browserLaunchRetryAttempts.