README.md in greenjaguar-0.0.3 vs README.md in greenjaguar-0.0.4

- old
+ new

@@ -43,11 +43,11 @@ include Greenjaguar def your_method # Build retry policy @policy = build_policy do - retry_times 10 + times 10 with_strategy :exponential_backoff measure_time_in :ms only_on_exceptions [Net::HTTPError] end @@ -60,9 +60,26 @@ ``` In the above example your code block is passed to Greenjaguar which executes it 11 times (first call + 10 retry attempts, in case of failures). If all calls fail, the last exception is raised. Retry happens only if the error raised is of the specified type. + +## Available Options explained +- times: Number of retry attempts +- with_strategy: Retry Strategy to use. Greenjaguar currently supports following + - exponential_backoff: wait times after each failed retry will increase exponentially. This is the standard + used in most of the industry's retry policies. + - fibonacci: wait times increase in fibonacci series. + - fixed_interval: wait times between retries are fixed. + - random: wait times are randomly selected between 0 to 5 secs. + Skip this option if you want immediate retries. +- measure_time_in: wait times can be in either sec or ms. +- only_on_exceptions: Provide the Exception Types for which Greenjaguar should retry. Default is all. +- fail_silently: Will fail silently without raising any exceptions after all retries fail. +- never_give_up: Retry will continue indefinitely or until there is success. +- timeout_after: Set a timeout period after which Greenjaguar should quit and just raise the exception. + +Refer spec/greenjaguar_spec.rb to se examples of using the options. ## Issues 1. Need more tests. 2. Need logo.