From 65b38f15954b4197062bbb2895fa94e457f30d2a Mon Sep 17 00:00:00 2001 From: --replace-all <helge.marc.ole.jentsch@uni-hamburg.de> Date: Wed, 5 Jul 2023 18:35:48 +0200 Subject: [PATCH] 0.1.7-2: adjusted 5m timeout for WC CMIP6 download --- DESCRIPTION | 2 +- R/WorldClim_download_functions.R | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 22f1430..e63c0e6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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], diff --git a/R/WorldClim_download_functions.R b/R/WorldClim_download_functions.R index d2272a0..6b07ad4 100644 --- a/R/WorldClim_download_functions.R +++ b/R/WorldClim_download_functions.R @@ -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 -- GitLab