You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ These methods all accept keyword arguments which control how the request is made
73
73
74
74
-`max_retries::Int=5`: how many retries to attempt in requesting the resources. Retries are only made for idempotent requests ("GET", "HEAD", "OPTIONS", "TRACE", "PUT", "DELETE") and delays respect GitHub [rate limit headers](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#checking-the-status-of-your-rate-limit).
75
75
-`verbose::Bool=true`: whether or not to log retries as Info level logs
76
+
-`max_sleep_seconds::Real=60*20`: if GitHub.jl intends to sleep for longer than `max_sleep_seconds` before retrying, e.g. due to rate limit headers from GitHub, throws an `RetryDelayException` instead.
Generic retry wrapper that executes function `f()` with GitHub-specific retry logic.
191
196
@@ -195,6 +200,7 @@ Generic retry wrapper that executes function `f()` with GitHub-specific retry lo
195
200
- `max_retries`: Maximum number of retry attempts (default: 5)
196
201
- `verbose`: Whether to log retry decisions (default: true)
197
202
- `sleep_fn`: Function to call for sleeping between retries (default: sleep). For testing, can be replaced with a custom function.
203
+
- `max_sleep_seconds::Real`: maximum number of seconds to sleep when delaying before retrying. If the intended retry delay exceeds `max_sleep_seconds` an exception is thrown instead. This parameter defaults to 20*60 (20 minutes).
198
204
199
205
# Returns
200
206
Returns the result of `f()` if successful, or re-throws the final exception if all retries fail.
@@ -206,7 +212,7 @@ result = with_retries(method="GET", verbose=false) do
0 commit comments