You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by sc...@apache.org on 2008/10/01 07:18:31 UTC

svn commit: r700681 - /gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py

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)