From 754adc72d77101a82e51bcb3df2fa5c1c54b9ccf Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 2 Oct 2025 10:32:21 +0100 Subject: [PATCH] ajouter un temps dattent qui augment avec le nombre d'erreur --- R/request.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/request.R b/R/request.R index 572b927..c3167d4 100644 --- a/R/request.R +++ b/R/request.R @@ -37,7 +37,7 @@ request_api <- function(url_with_params,headers,code,retry_limit=5,timesleep=20) print(url_with_params) print(paste0("retry #",retry_count,"/",retry_limit)) retry_count <- retry_count + 1 - Sys.sleep(timesleep) + Sys.sleep(timesleep*(1+retry_count/retry_limit)) } } if(!success) return(NULL)