Skip to content

Commit

Permalink
Add command params to control retries of failed API requests (#243)
Browse files Browse the repository at this point in the history
* npm audit fix

* Backoff for failed API requests
  • Loading branch information
bleachy authored Feb 18, 2023
1 parent e31d99e commit 0e1e1bc
Show file tree
Hide file tree
Showing 15 changed files with 548 additions and 209 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
*.log
npm-debug.log
.nyc_output
.idea/
26 changes: 26 additions & 0 deletions bin/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,30 @@ Options:
Applies to: change-listener, replicator
Default: 600

--backoff-strategy=type The backoff strategy to apply to failed API requests. Supported backoff
types are: linear, exponential.

Applies to: change-listener
Default: linear

--backoff-multiplier=num If --backoff-strategy=exponential this value dictates the multiplier used
when calculating the next retry interval.

Applies to: change-listener
Default: 2

--backoff-delay=secs If backoff type is linear this is the constant interval between retry
attempts. If backoff type is exponential then this is the initial interval,
and each subsequent retry will be multiplied by the value of
--backoff-multiplier.

Applies to: change-listener
Default: 5

--backoff-limit=num The maximum number of retry attempts allowed for failed API requests. If this
value is 0 (the default) then it will retry indefinitely.

Applies to: change-listener
Default: 0

--version Output the version
4 changes: 4 additions & 0 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e

# All command line params in alpha order without the starting --
declare -a params=(
"backoff-delay"
"backoff-limit"
"backoff-multiplier"
"backoff-strategy"
"batch-size"
"batch-timeout"
"check-stalled"
Expand Down
Loading

0 comments on commit 0e1e1bc

Please sign in to comment.