FSX / momoko

Wraps (asynchronous) Psycopg2 for Tornado.
http://momoko.61924.nl/
Other
363 stars 73 forks source link

Wait for a pending connection when acquiring #122

Closed jbowes closed 8 years ago

jbowes commented 8 years ago

There are two cases when a caller might ask for a connection when the only available ones are in a pending state:

Instead of immediately returning an error to the caller, add them to the waiting queue, allowing them to either get a connection, or return an error if none of the pending connections succeed.

haizaar commented 8 years ago

Nice catch. Can you please add unittests for the two cases you describe?

Thanks.

jbowes commented 8 years ago

Nice catch. Can you please add unittests for the two cases you describe?

Thanks :)

Sure can!

I'll try to add those in the next day or two.

haizaar commented 8 years ago

Hi, I'm kindly asking if you have update on this?

jbowes commented 8 years ago

Hi!

I've been away. I did start trying to run the tests on OS X, but have had a lot of failures.

What do you use to develop/run the tests? maybe I'll have better luck in a VM of a similar setup.

haizaar commented 8 years ago

I'm running on Ubuntu 14.04. Travis CI environment runs Ubuntu as well. Please note that you need a gcc compiler available.

I suggest using Ubuntu 14.04 VM. Get it working on a single version of Python, push the code and let Travis to run the full comparability matrix for you.

Let me know if you need any further help.

On Mon, Oct 5, 2015 at 9:28 PM, James Bowes notifications@github.com wrote:

Hi!

I've been away. I did start trying to run the tests on OS X, but have had a lot of failures.

What do you use to develop/run the tests? maybe I'll have better luck in a VM of a similar setup.

— Reply to this email directly or view it on GitHub https://github.com/FSX/momoko/pull/122#issuecomment-145623438.

Zaar

jbowes commented 8 years ago

updated with tests :)

jbowes commented 8 years ago

Makes sense to me!

I'll implement that and add a few tests to ensure callers will get exceptions.

haizaar commented 8 years ago

Another gentle ping :)

jbowes commented 8 years ago

Oh!

It's all updated and passing... I forgot to leave a comment though :crying_cat_face:

haizaar commented 8 years ago

Thank you!

jbowes commented 8 years ago

My pleasure:)