Skip to content
Snippets Groups Projects
Commit 65b38f15 authored by Jentsch, Helge's avatar Jentsch, Helge
Browse files

0.1.7-2: adjusted 5m timeout for WC CMIP6 download

parent a1a82196
Branches
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ Suggests: knitr, testthat, usethis, rmarkdown
VignetteBuilder: knitr
SystemRequirements: Tested with at least 4 GB RAM.
NeedsCompilation: no
Packaged: 2023-07-05 14:07:57 UTC; helge
Packaged: 2023-07-05 16:26:13 UTC; helge
Author: Helge Jentsch [aut, cre],
Maria Bobrowski [aut],
Johannes Weidinger [aut],
......
......@@ -1266,14 +1266,15 @@ WorldClim.CMIP_6.download <- function(save.location = "./",
# if(url.exists(URL.temp)){
# if(RCurl::urlExists(url = URL.temp)){
URLstatus <- curl::curl_fetch_memory(url = URL.temp)$status
# print(URLstatus)
if(URLstatus == 200){
# clear up the temporary directory
unlink(list.files(tempdir(), recursive = T, full.names=T))
if(res.temp == "30s"){
options(timeout = max(2400, getOption("timeout")))
}else{
if(getOption("timeout") != 60){
options(timeout = max(60, getOption("timeout")))
if(getOption("timeout") != 300){
options(timeout = max(300, getOption("timeout")))
}
}
# download file to save location
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment