Skip to content

Commit

Permalink
add retries
Browse files Browse the repository at this point in the history
  • Loading branch information
boshek committed Dec 12, 2023
1 parent 84c2f70 commit d774649
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: conbenchcoms
Title: An API wrapper for conbench communications
Version: 0.0.9
Version: 0.0.10
Authors@R: c(
person("Jonathan", "Keane", , "[email protected]", role = c("aut", "ctb"),
comment = c(ORCID = "0000-0001-7087-9776")),
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# combenchcoms 0.0.10
* Add httr2's baked in retry strategy to all api calls

# conbenchcoms 0.0.9
* Remove `compare` function
* Add `compare_results` function (similar to old `compare` but only works for comparing benchmark results)
Expand Down
2 changes: 2 additions & 0 deletions R/session.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ conbench_perform <- function(data, ...) {
resp <- data |>
req_error(is_error = function(resp) FALSE) |>
req_headers(cookie = .conbench_session$cookie) |>
req_retry(max_tries = 5) |>
req_perform(...)

# Authenticate if we need to
Expand All @@ -25,6 +26,7 @@ conbench_perform <- function(data, ...) {
resp <- data |>
req_error(body = error_body) |>
req_headers(cookie = .conbench_session$cookie) |>
req_retry(max_tries = 5) |>
req_perform(...)

resp
Expand Down

0 comments on commit d774649

Please sign in to comment.