gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scte...@apache.org
Subject svn commit: r700681 - /gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py
Date Wed, 01 Oct 2008 05:18:31 GMT
Author: sctemme
Date: Tue Sep 30 22:18:31 2008
New Revision: 700681

URL: http://svn.apache.org/viewvc?rev=700681&view=rev
Log:
Hang back a little after firing off the Maven repo proxy so Gump won't start using it before
it's ready

Modified:
    gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py

Modified: gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py?rev=700681&r1=700680&r2=700681&view=diff
==============================================================================
--- gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py (original)
+++ gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py Tue Sep 30 22:18:31 2008
@@ -74,6 +74,16 @@
             # TODO emulate spawnlp on non-Unix platforms
             os.spawnlp(os.P_NOWAIT, self.java, self.java, '-jar', proxyJar,
                        self.workspace.mvnRepoProxyPort)
+            # 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
+                    log.info('mvn Repository proxy started')
+                    break
+                except IOError:
+                    time.sleep(1)
+                    continue
         except:
             log.error('--- Failed to start proxy', exc_info=1)
 



Mime
View raw message