Fix unlimited refresh tries
This commit is contained in:
parent
2b5900c6a7
commit
2893d9fe28
1 changed files with 3 additions and 2 deletions
|
@ -27,6 +27,7 @@ async function run() {
|
|||
|
||||
const page = await browser.newPage(),
|
||||
maxVariance = 8,
|
||||
refreshTries = Number(config.refresh_tries),
|
||||
startTime = Number(config.start_time.replace(/:.*/, "")) + Number(config.start_time.replace(/^[^:]*:/, "")) / 60,
|
||||
endTime = Number(config.end_time.replace(/:.*/, "")) + Number(config.end_time.replace(/^[^:]*:/, "")) / 60;
|
||||
|
||||
|
@ -116,8 +117,8 @@ async function run() {
|
|||
}
|
||||
|
||||
break;
|
||||
} else if (config.refresh_tries !== 0 && currentTry > config.refresh_tries) {
|
||||
log(`Fail: Maximum number of refresh tries reached (${config.refresh_tries})`);
|
||||
} else if (refreshTries !== 0 && currentTry > refreshTries) {
|
||||
log(`Fail: Maximum number of refresh tries reached (${refreshTries})`);
|
||||
success = false;
|
||||
break;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue