fix(frontend): aumentar timeout de polling para 45 minutos
This commit is contained in:
@@ -72,7 +72,7 @@ function App() {
|
|||||||
setProcessMessage('Processamento do ranking já iniciado. Aguardando...');
|
setProcessMessage('Processamento do ranking já iniciado. Aguardando...');
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_POLLING_TIME = 5 * 60 * 1000;
|
const MAX_POLLING_TIME = 45 * 60 * 1000;
|
||||||
const POLLING_INTERVAL = 4000;
|
const POLLING_INTERVAL = 4000;
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Date.now() - startTime >= MAX_POLLING_TIME) {
|
if (Date.now() - startTime >= MAX_POLLING_TIME) {
|
||||||
throw new Error('Timeout: processamento demorou mais que 5 minutos');
|
throw new Error('Timeout: processamento demorou mais que 45 minutos');
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await rankingService.getRanking(page, pageSize);
|
const response = await rankingService.getRanking(page, pageSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user