increase number of retries
This commit is contained in:
parent
ff0dc23d5d
commit
e1b062f19e
@ -272,7 +272,7 @@ class Resizer {
|
|||||||
if (stretchFactors?.error === 'illegal_video_dimensions') {
|
if (stretchFactors?.error === 'illegal_video_dimensions') {
|
||||||
let timeout = 10; // ms
|
let timeout = 10; // ms
|
||||||
let iteration = 0;
|
let iteration = 0;
|
||||||
let maxIterations = 6;
|
let maxIterations = 15;
|
||||||
do {
|
do {
|
||||||
if (iteration > maxIterations) {
|
if (iteration > maxIterations) {
|
||||||
this.logger.log('error', 'debug', `[Resizer::setAr] <rid:${this.resizerId}> Video dimensions remain illegal after ${maxIterations} retries`);
|
this.logger.log('error', 'debug', `[Resizer::setAr] <rid:${this.resizerId}> Video dimensions remain illegal after ${maxIterations} retries`);
|
||||||
@ -281,7 +281,7 @@ class Resizer {
|
|||||||
// fire first few rechecks in quick succession, but start increasing timeout
|
// fire first few rechecks in quick succession, but start increasing timeout
|
||||||
// later down the line.
|
// later down the line.
|
||||||
if (iteration > 3) {
|
if (iteration > 3) {
|
||||||
timeout *= 2;
|
timeout = Math.max(2 * timeout, 1000);
|
||||||
}
|
}
|
||||||
this.logger.log('info', 'debug', `[Resizer::setAr] <rid:${this.resizerId}> Sleeping for ${timeout} ms`);
|
this.logger.log('info', 'debug', `[Resizer::setAr] <rid:${this.resizerId}> Sleeping for ${timeout} ms`);
|
||||||
await sleep(timeout);
|
await sleep(timeout);
|
||||||
|
Loading…
Reference in New Issue
Block a user