Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard-code 'us-east-1' and 'us-east-2' as regions in SQS AwsServiceMan… #115

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ History
=======


v0.20.2 (2023-11-16)

* Hard-code 'us-east-1' and 'us-east-2' as regions in SQS AwsServiceManager.


v0.20.1 (2023-11-16)

* Add sqs.sync_add_regions for setting region besides us-east-1 during instantiation of LongRunningJobs.
Expand Down
12 changes: 1 addition & 11 deletions aioradio/aws/sqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from aioradio.aws.utils import AwsServiceManager

LOG = logging.getLogger(__name__)
AWS_SERVICE = AwsServiceManager(service='sqs', regions=['us-east-1'])
AWS_SERVICE = AwsServiceManager(service='sqs', regions=['us-east-1', 'us-east-2'])
SQS = AWS_SERVICE.service_dict


Expand All @@ -25,16 +25,6 @@ async def add_regions(regions: List[str]):
AWS_SERVICE.add_regions(regions)


def sync_add_regions(regions: List[str]):
"""Add regions to SQS AWS service.

Args:
regions (List[str]): List of AWS regions
"""

AWS_SERVICE.add_regions(regions)


@AWS_SERVICE.active
async def create_queue(queue: str, region: str, attributes: Dict[str, str], account_id: str='') -> Dict[str, Any]:
"""Create SQS queue in region defined.
Expand Down
1 change: 0 additions & 1 deletion aioradio/long_running_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class LongRunningJobs:
# define the queue name and aws region
sqs_queue: str = None
sqs_region: str = None
sqs.sync_add_regions([sqs_region])

# If running test cases use fakeredis
fakeredis: bool = False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
long_description = fileobj.read()

setup(name='aioradio',
version='0.20.1',
version='0.20.2',
description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down