You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/11/12 02:53:47 UTC
svn commit: r1201156 - in /libcloud/branches/0.6.x: ./
libcloud/common/base.py
Author: tomaz
Date: Sat Nov 12 01:53:47 2011
New Revision: 1201156
URL: http://svn.apache.org/viewvc?rev=1201156&view=rev
Log:
Actually use poll_interval and don't ignore it. Also bump default poll timeout
to 200 seconds (back-port from trunk).
Modified:
libcloud/branches/0.6.x/ (props changed)
libcloud/branches/0.6.x/libcloud/common/base.py
Propchange: libcloud/branches/0.6.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Nov 12 01:53:47 2011
@@ -1 +1 @@
-/libcloud/trunk:1201138,1201141
+/libcloud/trunk:1201138,1201141,1201152
Modified: libcloud/branches/0.6.x/libcloud/common/base.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.6.x/libcloud/common/base.py?rev=1201156&r1=1201155&r2=1201156&view=diff
==============================================================================
--- libcloud/branches/0.6.x/libcloud/common/base.py (original)
+++ libcloud/branches/0.6.x/libcloud/common/base.py Sat Nov 12 01:53:47 2011
@@ -546,7 +546,7 @@ class PollingConnection(Connection):
If job doesn't finish in timeout seconds, an Exception thrown.
"""
poll_interval = 0.5
- timeout = 10
+ timeout = 200
request_method = 'request'
def async_request(self, action, params=None, data='', headers=None,
@@ -605,6 +605,7 @@ class PollingConnection(Connection):
while time.time() < end and not completed:
response = request(**kwargs)
completed = self.has_completed(response=response)
+ time.sleep(self.poll_interval)
if not completed:
raise LibcloudError('Job did not complete in %s seconds' %