Skip to content

Commit

Permalink
Use even longer timeout for FTP server response
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Jun 7, 2024
1 parent 82707b4 commit 8f9f01a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion R/find_forecast_towns.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ find_forecast_towns <-

file_dbf <- file.path(tempdir(), "AAC_codes.dbf")

op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

on.exit(unlink(file_dbf))
Expand Down
2 changes: 1 addition & 1 deletion R/get_bom_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @noRd

.get_bom_metadata <- function() {
op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

file_in <- file.path(tempdir(), "stations.txt")
Expand Down
2 changes: 1 addition & 1 deletion R/get_coastal_forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ get_coastal_forecast <- function(state = "AUS") {
#' @autoglobal
.parse_coastal_forecast <- function(xml_url) {

op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

# load the XML from ftp
Expand Down
2 changes: 1 addition & 1 deletion R/get_precis_forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ get_precis_forecast <- function(state = "AUS") {

.parse_precis_forecast <- function(xml_url) {

op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

# load the XML from ftp
Expand Down
4 changes: 2 additions & 2 deletions R/get_radar_imagery.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

get_available_radar <- function(radar_id = "all") {

op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

ftp_base <- "ftp://ftp.bom.gov.au/anon/gen/radar/"
Expand Down Expand Up @@ -165,7 +165,7 @@ get_radar_imagery <- get_radar <-
)
}

op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

ftp_base <- "ftp://ftp.bom.gov.au/anon/gen/radar"
Expand Down
4 changes: 2 additions & 2 deletions R/get_satellite_imagery.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ get_satellite_imagery <- get_satellite <-
stop("{weatherOz} only supports working with one Product ID at a time\n")
}

op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

ftp_base <- "ftp://ftp.bom.gov.au/anon/gen/gms/"
Expand Down Expand Up @@ -278,7 +278,7 @@ get_satellite_imagery <- get_satellite <-
handle = list_files,
TCP_KEEPALIVE = 60L,
CONNECTTIMEOUT = 60L,
TIMEOUT = 120L,
timeout = 480L,
USERAGENT = USERAGENT,
ftp_use_epsv = TRUE,
dirlistonly = TRUE
Expand Down
2 changes: 1 addition & 1 deletion R/internal_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@

.get_url <- function(remote_file) {

op <- options(timeout = 120L)
op <- options(timeout = 480L)
on.exit(options(op))

bom_file <- file.path(tempdir(), "BOM_file.xml")
Expand Down

0 comments on commit 8f9f01a

Please sign in to comment.