Add `total_delay` to handler arguments #1

Merged
merged 2 commits into from Mar 12, 2013

Projects

None yet

2 participants

@mmazour
Contributor
mmazour commented Mar 11, 2013

Pass the total time waited to the handler. This is to facilitate, for example,
bumping a stat or emitting a warning when delays exceed a threshold.

Includes test, and README change.

Michael Mazour Add `total_delay` to handler arguments
Pass the total time waited to the handler.  This is to facilitate, for example,
bumping a stat or emitting a warning when delays exceed a threshold.
ea1a653
@cespare
Collaborator
cespare commented Mar 11, 2013

Hi @mmazour, thanks for this change. See the comments I've made -- otherwise, it looks good to me. I'll merge and push a new gem version if you can address the comments.

Michael Mazour Further tweaks to `total_delay` handler arg
- Improve method comment
- Tidy up test
 - Speed up test
5e700e0
@mmazour
Contributor
mmazour commented Mar 12, 2013

Thanks very much, @cespare. I've now added a commit with the changes you suggested. (I also wrapped a line in one of your tests to make it visually consistent with the line of mine that had to be wrapped; hope that's OK.)

Tests now run in ~ 0.11s - 0.14s for me; is that quick enough? I can dial the timings down tighter if you like, but I didn't want to push too hard and wind up with false failures on (for example) a slightly hiccup-prone older laptop.

@cespare cespare merged commit 5e700e0 into ooyala:master Mar 12, 2013
@cespare
Collaborator
cespare commented Mar 12, 2013

Hi @mmazour,

I merged the change. I went ahead and made the test completely timing-independent in d865b74; let me know what you think. I've also pushed 0.0.4 to Rubygems.

@mmazour
Contributor
mmazour commented Mar 13, 2013

Cool. Thanks very much!

Michael

On 12 March 2013 23:03, Caleb Spare notifications@github.com wrote:

Hi @mmazour https://github.com/mmazour,

I merged the change. I went ahead and made the test completely
timing-independent in d865b74d865b74;
let me know what you think. I've also pushed 0.0.4 to Rubygems.


Reply to this email directly or view it on GitHubhttps://github.com/ooyala/retries/pull/1#issuecomment-14811661
.

Global Personals is a limited company registered in England and Wales.

Registered number: 04880697

Registered office: Minton Place, Victoria Street, Windsor, Berkshire, SL4
1EG, United Kingdom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment