Skip to content

Commit

Permalink
improved progress indicator for large queries <3
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaSanchezTapia committed Nov 8, 2024
1 parent c9140cc commit 2b4d03c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/get_vessel_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ get_vessel_info <- function(query = NULL,
next_since <- next_response$since
n_entries <- length(next_response$entries)
if (quiet == FALSE) {
total_requests <- floor(total/limit)
current_request <- length(responses) + 1
message(paste(floor(current_request*100/total_requests), "%" ))
}
total_requests <- ceiling(total/limit)
current_request <- length(responses)
cat("\rDownloading", floor(current_request*100/total_requests), "%" )
}
}
# format tibbles
all_entries <- purrr::map(responses, purrr::pluck, 'entries')
Expand Down

0 comments on commit 2b4d03c

Please sign in to comment.