Skip to content

Commit

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

Increase the timeout, see if that's the issue on CRAN.

### What changes are included in this PR?

Timeout, increased

### Are these changes tested?

No

### Are there any user-facing changes?

Slightly slower downloads are possible.
  • Loading branch information
jonkeane authored and kou committed Feb 25, 2025
1 parent 383f26c commit 8e23ee4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions r/tools/nixlibs.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ try_download <- function(from_url, to_file, hush = quietly) {
return(FALSE)
}
# 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 .3 MB/s (slow). This is to anticipate slower user connections or load on
# artifactory servers.
opts <- options(timeout = max(300, getOption("timeout")))
# This assumes a static library size of 100 MB (our current biggest is 78 MB) and
# a download speed of 0.2 MB/s (slow). This is to anticipate slower user connections
# or load on artifactory servers.
opts <- options(timeout = max(600, getOption("timeout")))
on.exit(options(opts))

status <- try(
Expand Down

0 comments on commit 8e23ee4

Please sign in to comment.