-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for larger values in oneshot timer intervals #784
Allow for larger values in oneshot timer intervals #784
Conversation
Looks good! Could you also add a unit test for a large-future-value timer to |
Nudge for a unit test please. |
I've been AFK for a bit, but I will add a unit test as soon as I am able. 👍 |
5f9ba73
to
b7fa58b
Compare
@sodabrew ready for your review |
Looks good! One last thought: in lib/eventmachine.rb, the value is converted to float before it is multiplied by 1000: |
Since Ruby 1.8.7 a Fixnum will transparently upgrade to a Bignum if needed. As such we should no longer need to cast to float before multiplying by 1000 for converting seconds to miliseconds.
@sodabrew I've attempted the change you suggested but it seems to have broken a number of tests for reasons unclear to me. Can you see a reason for the breakage? Should I revert this latest commit? |
I was wrong about the placement of the |
This reverts commit eb9ae47.
Thank you! Glad to get this landed now. |
Released today with Eventmachine 1.2.5 on Rubygems! |
In the Sensu project we've added support for scheduling timers using cron syntax. In sensu/sensu#1665 a user reported that they were able to cause an exception in scheduling by configuring a timer that should run on the first of every month.
This pull request seeks to address this exception by using variable types which allow for larger interval values.