Allow message passing to SQS queues in different regions from SNS.

This commit is contained in:
Steve Pulec 2014-11-16 18:42:53 -05:00
commit 16660ab72b
3 changed files with 27 additions and 3 deletions

View file

@ -12,11 +12,12 @@ from .exceptions import (
)
MAXIMUM_VISIBILTY_TIMEOUT = 43200
SQS_REGION_REGEX = r'://(.+?)\.queue\.amazonaws\.com'
class QueuesResponse(BaseResponse):
region_regex = r'://(.+?)\.queue\.amazonaws\.com'
region_regex = SQS_REGION_REGEX
@property
def sqs_backend(self):
@ -50,6 +51,8 @@ class QueuesResponse(BaseResponse):
class QueueResponse(BaseResponse):
region_regex = SQS_REGION_REGEX
@property
def sqs_backend(self):
return sqs_backends[self.region]