Skip to content

Commit

Permalink
MINOR: [R] Increase timeout for binary download (apache#39080)
Browse files Browse the repository at this point in the history
### Rationale for this change

Download of mac binaries failed on CRAN and would likely fail on my local ancient bandwidth DSL (~300-500kbs) as well so a bit more buffer in the timeour value should help.

### What changes are included in this PR?

Increase timeout.

### Are these changes tested?

Not really testable.

### Are there any user-facing changes?

No.

Authored-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
  • Loading branch information
assignUser authored Dec 5, 2023
1 parent 67b8df4 commit 804b4f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions r/tools/nixlibs.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ find_latest_nightly <- function(description_version,
try_download <- function(from_url, to_file, hush = quietly) {
# We download some fairly large files, so ensure the timeout is set appropriately.
# This assumes a static library size of 100 MB (generous) and a download speed
# of 1 MB/s (slow).
opts <- options(timeout = max(100, getOption("timeout")))
# of .3 MB/s (slow). This is to anticipate slower user connections or load on
# artifactory servers.
opts <- options(timeout = max(300, getOption("timeout")))
on.exit(options(opts))

status <- try(
Expand Down

0 comments on commit 804b4f8

Please sign in to comment.