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:44:34 UTC
svn commit: r1201152 - /libcloud/trunk/libcloud/common/base.py
Author: tomaz
Date: Sat Nov 12 01:44:34 2011
New Revision: 1201152
URL: http://svn.apache.org/viewvc?rev=1201152&view=rev
Log:
Actually use poll_interval and don't ignore it. Also bump default poll timeout
to 200 seconds.
Modified:
libcloud/trunk/libcloud/common/base.py
Modified: libcloud/trunk/libcloud/common/base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/base.py?rev=1201152&r1=1201151&r2=1201152&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/base.py (original)
+++ libcloud/trunk/libcloud/common/base.py Sat Nov 12 01:44:34 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' %