Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Unified Diff: boto/sqs/connection.py

Issue 8669001: Pull in upstream boto from github at bcb719937de9ac2851e632d62b777352029a6d55 (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « boto/sqs/__init__.py ('k') | boto/sqs/queue.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/sqs/connection.py
diff --git a/boto/sqs/connection.py b/boto/sqs/connection.py
index 56ddc439e819d31a4376ce99521aa526b2d2a0ee..1c59b7d646a245272d93948e44a78788c43ce598 100644
--- a/boto/sqs/connection.py
+++ b/boto/sqs/connection.py
@@ -33,10 +33,10 @@ class SQSConnection(AWSQueryConnection):
"""
DefaultRegionName = 'us-east-1'
DefaultRegionEndpoint = 'queue.amazonaws.com'
- APIVersion = '2009-02-01'
+ APIVersion = '2011-10-01'
DefaultContentType = 'text/plain'
ResponseError = SQSError
-
+
def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
is_secure=True, port=None, proxy=None, proxy_port=None,
proxy_user=None, proxy_pass=None, debug=0,
@@ -85,7 +85,8 @@ class SQSConnection(AWSQueryConnection):
"""
params = {'QueueName': queue_name}
if visibility_timeout:
- params['DefaultVisibilityTimeout'] = '%d' % (visibility_timeout,)
+ params['Attribute.1.Name'] = 'VisibilityTimeout'
+ params['Attribute.1.Value'] = int(visibility_timeout)
return self.get_object('CreateQueue', params, Queue)
def delete_queue(self, queue, force_deletion=False):
@@ -210,8 +211,10 @@ class SQSConnection(AWSQueryConnection):
params = {'ReceiptHandle' : receipt_handle}
return self.get_status('DeleteMessage', params, queue.id)
- def send_message(self, queue, message_content):
+ def send_message(self, queue, message_content, delay_seconds=None):
params = {'MessageBody' : message_content}
+ if delay_seconds:
+ params['DelaySeconds'] = int(delay_seconds)
return self.get_object('SendMessage', params, Message,
queue.id, verb='POST')
@@ -241,7 +244,7 @@ class SQSConnection(AWSQueryConnection):
if prefix:
params['QueueNamePrefix'] = prefix
return self.get_list('ListQueues', params, [('QueueUrl', Queue)])
-
+
def get_queue(self, queue_name):
rs = self.get_all_queues(queue_name)
for q in rs:
@@ -305,7 +308,7 @@ class SQSConnection(AWSQueryConnection):
params = {'Label': label}
return self.get_status('RemovePermission', params, queue.id)
-
-
-
+
+
+
« no previous file with comments | « boto/sqs/__init__.py ('k') | boto/sqs/queue.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698