urbancoding / jenx

A Jenkins build server monitor for Mac OS X, powered by MacRuby. This app sits in your status bar and reports the status of all your Jenkins builds. Click on a job, and it opens it up in your browser. It even supports Growl!
http://urbancoding.github.com/jenx/
175 stars 13 forks source link

reconnect if jenx looses connection #8

Closed t2 closed 12 years ago

t2 commented 13 years ago

When the user closes the computer of Jenx looses connection to the build server we need to periodically check to see if that connection has been reestablished and refresh the app.

mikegehard commented 13 years ago

Will this refresh the project list?

t2 commented 13 years ago

Yes this will once implemented. I have paused development on my side due to the issues with Xcode 4.1 and MacRuby. Supposedly there is a fix for this in Xcode 4.2. Once it is released I will pick back up on this.

mikegehard commented 13 years ago

Great! Thanks for your hard work.

Sent from a small keyboard. Please excuse the typos.

On Sep 15, 2011, at 9:21 AM, Trent Kocurek reply@reply.github.com wrote:

Yes this will once implemented. I have paused development on my side due to the issues with Xcode 4.1 and MacRuby. Supposedly there is a fix for this in Xcode 4.2. Once it is released I will pick back up on this.

Reply to this email directly or view it on GitHub: https://github.com/urbancoding/jenx/issues/8#issuecomment-2104262

msabramo commented 12 years ago

Can we just do this?

diff --git a/jenx/Jenx.rb b/jenx/Jenx.rb
index c338cf2..67bb6ea 100644
--- a/jenx/Jenx.rb
+++ b/jenx/Jenx.rb
@@ -110,7 +110,7 @@ class Jenx
     end

     def handle_broken_connection(error_type)
-        @refresh_timer.invalidate
+        # @refresh_timer.invalidate
         NSLog("#{CONNECTION_ERROR_TITLE}: #{error_type}")
         @jenx_item.setImage(@build_failure_icon)

I'm running with this change locally, because the connection to Jenkins would sometimes fail and then Jenx wouldn't try to reconnect. I hesitate because I don't know what the rationale was for invalidating the timer in the first place; I suspect it fixed some other issue.

t2 commented 12 years ago

I can't think of the reason I invalidated the timer. If it works then I say lets go for it. Do you know how to build and deploy to gh-pages with the new DMG?