jegesh / python-sqs-listener

A simple wrapper for boto3 for listening, and sending, to an AWS SQS queue
Other
154 stars 72 forks source link

Allow for queue_url to be passed in #14

Closed golmansax closed 6 years ago

golmansax commented 6 years ago

Any reason not to allow queue_url to be passed in rather than queue_name? If you are okay with supporting it, I can draft a pull request.

jegesh commented 6 years ago

If you mean adding a second constructor alongside the original one, then I agree.

I think in most cases people don't have the queue url on hand, they just know the name, therefore up 'til now there was no demand for this. Put if you need it, by all means, make a pull request!

On 20 February 2018 at 23:19, Holman Gao notifications@github.com wrote:

Any reason not to allow queue_url to be passed in rather than queue_name? If you are okay with supporting it, I can draft a pull request.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jegesh/python-sqs-listener/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AGO5FjpIae4vcdT-vI2ngBUAhcUkpZFWks5tWzbcgaJpZM4SMrr- .

golmansax commented 6 years ago

Thanks for getting back. What would a second constructor look like, Python doesn't support that by default? I was thinking there could be a check so that if in __init__(self, queue) and queue is a URL, then bypass the URL lookup by queue name.

jegesh commented 6 years ago

Good point. I guess your suggestion is a valid solution. See here and here for more 'pythonic' solutions.

On 23 February 2018 at 01:53, Holman Gao notifications@github.com wrote:

Thanks for getting back. What would a second constructor look like, Python doesn't support that by default? I was thinking there could be a check so that if in init(self, queue) and queue is a URL, then bypass the URL lookup by queue name.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jegesh/python-sqs-listener/issues/14#issuecomment-367863001, or mute the thread https://github.com/notifications/unsubscribe-auth/AGO5FpeKzqE-ZdDnsFi-Lo0bkdtwIHV9ks5tXf3egaJpZM4SMrr- .

golmansax commented 6 years ago

Hi, sorry for not responding to this sooner. We ended up forking the library because we had a few more changes that needed to be made, but will submit a pull if we end up making the code more generic.

jegesh commented 6 years ago

Pull request? No pressure, this is just for your own sake.