gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <>
Subject [PATCH] Give mvnproxy time to start
Date Sat, 26 Apr 2008 06:50:23 GMT

Since last weekend, Clarus has been running with the following patch:

--- python/gump/actor/mvnrepoproxy/	(revision 651761)
+++ python/gump/actor/mvnrepoproxy/	(working copy)
@@ -74,6 +74,16 @@
              # TODO emulate spawnlp on non-Unix platforms
              os.spawnlp(os.P_NOWAIT,,, '-jar',  
+            # Hang back for a bit while the proxy starts up
+            for pWait in range(10):
+                try:
+                    urllib.urlopen(self.proxyURL)
+                    # Not reached until urlopen succeeds
+          'mvn Repository proxy started')
+                    break
+                except IOError:
+                    time.sleep(1)
+                    continue
              log.error('--- Failed to start proxy', exc_info=1)

This causes the script to block for up to ten seconds or so after  
starting the Maven repository proxy, until it can connect to the proxy  
and fetch the index page.

Without this, the first few uploads would get 'Connection Refused' and  
I assume this would cause Bad Things  like missing artifacts down the  

I would commit this but it seems that I don't have commit on the code.


PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF

View raw message