Allow message passing to SQS queues in different regions from SNS.
This commit is contained in:
parent
53acdf6c76
commit
16660ab72b
3 changed files with 27 additions and 3 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue