droplet_kit
droplet_kit copied to clipboard
Faraday's retry configuration is not exposed
Faraday includes a retry middleware module.
At present, droplet_kit
does not expose this thus retries are not configurable unless the client's initialize
and connection
methods are overridden into a new client (as far as I can tell).
An enhancement here would produce an interface something like this
client = DropletKit::Client.new(
access_token: 'YOUR_TOKEN',
retry_exceptions: [CustomException, 'Timeout::Error'],
retry_statuses: [500, 501]
)
# or I think I prefer this:
client = DropletKit::Client.new(
access_token: 'YOUR_TOKEN',
retry: {
exceptions: [CustomException, 'Timeout::Error'],
statuses: [500, 501]
}
)
We're planning a thorough overhaul of droplet_kit
in the near future. Retries then!