libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r917913 - /incubator/libcloud/trunk/libcloud/base.py
Date Tue, 02 Mar 2010 08:22:38 GMT
Author: pquerna
Date: Tue Mar  2 08:22:38 2010
New Revision: 917913

URL: http://svn.apache.org/viewvc?rev=917913&view=rev
Log:
Move the time we sleep waiting for things to a single variable, and decrease it from 10 seconds
to 3 seconds.

Modified:
    incubator/libcloud/trunk/libcloud/base.py

Modified: incubator/libcloud/trunk/libcloud/base.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/base.py?rev=917913&r1=917912&r2=917913&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/base.py (original)
+++ incubator/libcloud/trunk/libcloud/base.py Tue Mar  2 08:22:38 2010
@@ -582,6 +582,7 @@
 
     def deploy_node(self, **kwargs):
         # TODO: support ssh keys
+        WAIT_PERIOD=3
         password = None
 
         if 'generates_password' not in self.features["create_node"]:
@@ -601,7 +602,7 @@
         while time.time() < end:
             # need to wait until we get a public IP address.
             # TODO: there must be a better way of doing this
-            time.sleep(10)
+            time.sleep(WAIT_PERIOD)
             nodes = self.list_nodes()
             nodes = filter(lambda n: n.uuid == node.uuid, nodes)
             if len(nodes) == 0:
@@ -627,10 +628,10 @@
                 laste = e
             except socket.error, e:
                 laste = e
-            time.sleep(10)
+            time.sleep(WAIT_PERIOD)
         if laste is not None:
             raise e
-            
+
         n = kwargs["deploy"].run(node, client)
         client.close()
         return n



Mime
View raw message