ajouter un temps dattent qui augment avec le nombre d'erreur
This commit is contained in:
parent
1631c7aa20
commit
754adc72d7
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ request_api <- function(url_with_params,headers,code,retry_limit=5,timesleep=20)
|
||||||
print(url_with_params)
|
print(url_with_params)
|
||||||
print(paste0("retry #",retry_count,"/",retry_limit))
|
print(paste0("retry #",retry_count,"/",retry_limit))
|
||||||
retry_count <- retry_count + 1
|
retry_count <- retry_count + 1
|
||||||
Sys.sleep(timesleep)
|
Sys.sleep(timesleep*(1+retry_count/retry_limit))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!success) return(NULL)
|
if(!success) return(NULL)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue