Yelp/sensu_handlers — pull request #10 by solarkennedy (2014-10-11 01:57:09+00:00)
Title: Fix devide by zero bug and properly handle exponential backoff with an alert_after. Closes #2

Primary: @bobtfish or @hashbrowncipher

This fixes #2 where we get divide by zero errors.

This was a hard to track down situation that only occurred when we had an alert_after and exponential backoff.

I hope I've made this filtering logic a bit more clear. Luckily we have tests!!! So using this new power-of-two function allowed me to be sure it still is legit.