spulec / PyQS

Python task-queues for Amazon SQS
MIT License
174 stars 36 forks source link

Honor AWS region configured by .aws/config or env var #56

Closed orangain closed 5 years ago

orangain commented 5 years ago

Fix #26

Problem

Currently, PySQ honors AWS region configure by .aws/config or environment variable AWS_DEFAULT_REGION when sending message to SQS, but does not honor it when launched by pysq command. Even if the region is configured, pysq worker uses us-east-1 when --region option is not provided.

This behavior is not good for people who use AWS regions other than us-east-1.

Changes

This PR make pyqs worker honer the region configured by .aws/config or environment variable. As a fallback, it uses us-east-1 as ever.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.5%) to 6.567% when pulling 0643fbb64a62aff3b95d1363392bb6ea0b91e134 on orangain:honor-aws-region into 7c793d01e63c01e66a7d7696a566bdecad4dda4b on spulec:master.

spulec commented 5 years ago

Thanks!