20 Commits

Author SHA1 Message Date
risk danger olson
6262970390 Merge pull request #437 from deseretbook/add-retry-option-to-ignore-idempotent-methods
Allow specifying methods that bypass :retry_if on Request::Retry
2015-01-07 09:58:04 -07:00
Ruslan Korolev
416a91bd8c testing negative numbers for retries 2014-11-26 13:50:26 +03:00
Mike Bourgeous
b1948c994b Added tests of customizable methods to retry without calling retry_if. 2014-11-13 16:30:22 -07:00
Mauricio Linhares
ee6aba99be Retry only if the method is idempotent
Only run retries if the method is known to be
idempotent. If it isn't, switch to use the retry_if
block to make the final decision, if it is known to
be idempotent allow it to be retried by default.
2014-02-11 10:29:53 -03:00
Mauricio Linhares
65b5e8a440 Adds a retry_if option to the retry middleware
retry_if allows users to provide a block that
will receive the env and exception objects
and should decide if the call should be retried
or not.

Fixes #298.
2014-02-11 10:29:52 -03:00
Mislav Marohnić
d30873c9fe Increase margin for timing assertion
Failed because delta was 0.03097:
https://travis-ci.org/lostisland/faraday/jobs/16672600
2014-01-09 10:46:42 -08:00
Tim Galeckas
80eacae193 change interval randomness to be expressed as an float percentage 2013-11-08 14:41:34 -06:00
Tim Galeckas
86663ca8fb give better failure messages for between checks 2013-08-29 22:50:43 -05:00
Tim Galeckas
5cb4a38495 divorce the testing of sleep_amount from Time.now 2013-08-29 22:30:36 -05:00
Tim Galeckas
37bd330979 Add backoff and randomness to retry middleware 2013-08-29 14:43:11 -05:00
Rafael Mendonça França
0adc6c69b2 Get the default values for the instrumenter options 2013-08-05 16:28:21 -03:00
technoweenie
2793e2ae91 ok rbx handles NameError differently 2013-01-05 11:12:31 -07:00
technoweenie
df484dfd1a match against ActiveSupport anywhere in the error name 2013-01-05 11:06:20 -07:00
technoweenie
4b30bf8b5e add instrumentation middleware. original work by @mislav
https://github.com/pengwynn/faraday_middleware/commit/23d5e614eea4f48dd5
a0eee68eb8b3d5e65b5275
2013-01-05 10:41:02 -07:00
Erik Michaels-Ober
faab1b08cd Replace test-unit with minitest 2012-12-16 20:22:03 -08:00
technoweenie
fa397470e2 simplify test requires 2012-10-21 10:25:34 -06:00
Mislav Marohnić
b9373a2187 tolerate bigger delta in retry middleware test
Helped JRuby in 1.9 mode
2012-08-16 18:20:23 +02:00
Mislav Marohnić
e8c98c4323 improve Retry middleware, change to only handle timeouts
Also supercharge it with :max, :interval, and :exceptions options.

Closes #158
2012-05-29 01:22:19 +02:00
rick
43343e971f remove timeout middleware 2011-12-28 13:53:00 -07:00
Andrew Kane
50b6e2841d Added retry and timeout middleware 2011-10-05 23:00:39 -07:00