Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport timing out acquire() call #127
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kevinburkeshyp
Feb 17, 2016
Contributor
Note, this builds on #125, so both commits are present in the diff. Happy to rebase/merge/submit against the branch/whatever you like.
|
Note, this builds on #125, so both commits are present in the diff. Happy to rebase/merge/submit against the branch/whatever you like. |
kevinburkeshyp
referenced this pull request
Feb 17, 2016
Closed
how to set timeout for resource acquiring, NOT resource creating? #85
pushed a commit
to Shyp/node-postgres
that referenced
this pull request
Feb 17, 2016
kevinburkeshyp
referenced this pull request
Feb 17, 2016
Closed
POC: Time out pg.connect() call #939
sandfox
added this to the 2.5.0 milestone
Feb 20, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kevinburkeshyp
Feb 20, 2016
Contributor
I pushed 81c28ad with a fudge for the timer tests. I'm not too happy with it. I can rebase down before merge.
|
I pushed 81c28ad with a fudge for the timer tests. I'm not too happy with it. I can rebase down before merge. |
sandfox
referenced this pull request
Feb 24, 2016
Closed
Question: What is the expected behavior when you try to acquire a connection exceeding the max number? #130
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
subeeshcbabu
commented
Feb 24, 2016
|
+1 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pdufour
commented
Mar 8, 2016
|
+1 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sandfox
Mar 14, 2016
Collaborator
Just an update. I'm sorry for the delay, work and life have been rather hectic at the moment, but I've scheduled in some time to look at this after Wednesday. Thanks for the patience
|
Just an update. I'm sorry for the delay, work and life have been rather hectic at the moment, but I've scheduled in some time to look at this after Wednesday. Thanks for the patience |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kevinburkeshyp
Mar 17, 2016
Contributor
Removed the block option in 5e4bf20. I can rebase down before merge.
|
Removed the block option in 5e4bf20. I can rebase down before merge. |
kevinburkeshyp
referenced this pull request
Mar 17, 2016
Closed
Add option to error if the pool is full #125
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Pushed the error callback to the next tick in 295e00a. |
added some commits
Feb 16, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Lint errors should be fixed in 5556a81. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sandfox
Mar 30, 2016
Collaborator
thanks
(passive aggresive internal voice): I WILL finish looking at this soon and merge it!
|
thanks (passive aggresive internal voice): I WILL finish looking at this soon and merge it! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
subeeshcbabu
commented
Mar 30, 2016
|
Great stuff. Waiting for this publish. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kevinburkeshyp
Apr 11, 2016
Contributor
@sandfox thoughts here? wondering if we should fork this lib & node-postgres or wait for upstream
|
@sandfox thoughts here? wondering if we should fork this lib & node-postgres or wait for upstream |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sandfox
Apr 14, 2016
Collaborator
@kevinburkeshyp this is for reals actually open in my text editor and I'm looking at it now :-)
|
@kevinburkeshyp this is for reals actually open in my text editor and I'm looking at it now :-) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Thanks! |
kevinburke
referenced this pull request
May 2, 2016
Closed
Add option to time out pg.connect() call #1006
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kevinburke
May 2, 2016
I've published this PR as a new package here: https://www.npmjs.com/package/generic-pool-timeout and submitted it for inclusion as part of node-postgres here: brianc/node-postgres#1006.
kevinburke
commented
May 2, 2016
|
I've published this PR as a new package here: https://www.npmjs.com/package/generic-pool-timeout and submitted it for inclusion as part of node-postgres here: brianc/node-postgres#1006. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kevinburkeshyp
May 27, 2016
Contributor
hey @sandfox - anything I can do to help push this across the finish line? code review other PR's? make a donation?
|
hey @sandfox - anything I can do to help push this across the finish line? code review other PR's? make a donation? |
pushed a commit
to Shyp/node-postgres
that referenced
this pull request
May 27, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sandfox
Jun 12, 2016
Collaborator
Hi Kevin,
Sorry for the haitus on this, I had a bit of collision of burnout, changing jobs, and some personal stuff.
Anywayaaay, onto code! Whilst looking at adding some other features I had to make some more big refactors on top you work and after various iterations and dead ends I've ended up realising alot of the future work isn't possible with jamming event-emitters into the lib/api.
The branch much features should have an implementation of the feature you are after, with some slight changes to accomodate other features. There are still a couple of test failures outstanding which I don't think can fixed without add event-emitters (which incidentally is needed to properly isolate the resource creation cycle/aspect from the resource issuance aspect/cycle, originally the two were too tightly coupled. A thing requesting a resource shouldn't care/know/etc about the resource factory having errors creating individual resources (but it will still obviously care about an overall failure to be able to create resources)).
The side effect of this is that the API change will probably mean a major version number bump which I wanted to avoid, but maybe that isn't a bad thing.
|
Hi Kevin, Sorry for the haitus on this, I had a bit of collision of burnout, changing jobs, and some personal stuff. The branch much features should have an implementation of the feature you are after, with some slight changes to accomodate other features. There are still a couple of test failures outstanding which I don't think can fixed without add event-emitters (which incidentally is needed to properly isolate the resource creation cycle/aspect from the resource issuance aspect/cycle, originally the two were too tightly coupled. A thing requesting a resource shouldn't care/know/etc about the resource factory having errors creating individual resources (but it will still obviously care about an overall failure to be able to create resources)). The side effect of this is that the API change will probably mean a major version number bump which I wanted to avoid, but maybe that isn't a bad thing. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
closing as this is now included as part of v3 |
kevinburkeshyp commentedFeb 17, 2016
The
optionsdictionary for pool.acquire() now takes a second argument,timeout. Pass an integer number of milliseconds to cancel the acquire() calland hit the callback with pool.Full after the given amount of time has elapsed.
Hits the callback with an immediate error if the timeout is a negative number,
zero, or NaN.
Adds a number of tests that this logic behaves as expected.
This work was sponsored by Shyp.