#261 ✓resolved
Fabio Lessa

Configuration problem causing project builder to be incorrectly identified as "down"

Reported by Fabio Lessa | July 9th, 2009 @ 05:18 AM | in current

While looking at ticket #257 I noticed that the projects page always indicate the builder status to be "down". By digging into the problem, I found these errors on my log/#{project_name}_builder.log file:

[error] can't convert ActiveSupport::Duration into time interval [error] /Users/flessa/Code/Ruby/cruisecontrol.rb/app/models/polling_scheduler.rb:29:in sleep' [error] /Users/flessa/Code/Ruby/cruisecontrol.rb/app/models/polling_scheduler.rb:29:incheck_build_request_until_next_polling' [error] /Users/flessa/Code/Ruby/cruisecontrol.rb/app/models/polling_scheduler.rb:15:in run'

build_request_checking_interval is set to an ActiveSupport::Duration value (using the num.seconds syntax) in the Configuration class, and sleep seems to be very strict about the type of "number" it expects...

>> 5.seconds == 5
=> true
>> 5.seconds.class
=> Fixnum
>> sleep 5.seconds
TypeError: can't convert ActiveSupport::Duration into time interval
    from (irb):9:in `sleep'
    from (irb):9

gotta love that magic ;)

I'm attaching a (really trivial) patch to fix the problem. I tried to find a good way of writing a test for it, but couldn't come up with anything that looked reasonable

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป