beanstalkc
beanstalkc copied to clipboard
A lot of miscellaneous work
Nice project you've got! I made a bunch of changes here:
- Merge in the wip-reconnect branch, which gives a big improvement in robustness.
- Rename README and TUTORIAL to .md files, for GitHub user-friendliness, and expand the README.
- Add a connection timeout. We can't do a general socket timeout, but we can add a timeout to the socket's initial connection attempt, which could be useful.
- Get rid of the dependency on PyYaml, replacing it with a custom parser that's more compatible with beanstalkd, and about 30 times faster. Adjust documentation to match.
- Add basic docstrings to all public methods.
There was also a brief attempt to make connections thread-local, but that patch was reverted. The Right Thing in this case is probably to keep thread-local connection pools, like they do over in redis-py.
Anyway, you've made what is easily the best beanstalkd client for Python, so thanks for that.
Peter, thanks a lot for this contribution. I'll review and handle it in separate parts over the next few days.
First up, the easiest part: the very documentation improvements are merged in 07a9b29e08f9952d3ea21d45b0bba317cbb93c41.
I merged the connection timeout parameter in cc22cefbd7f29f4056a7bc44092e4396f0f756c0. This is a good idea, even independently of the reconnection stuff in wip-reconnect
.
Note that I made two minor modifications:
- I renamed the parameter to
connect_timeout
- Instead of a custom default timeout, we're now falling back on
socket.getdefaulttimeout
(which is typicallyNone
, unless set by the user)
Any updates on this?
I would also love to see these fixes merged.
Thanks.
Any update here?
Dan and Dan, thanks for your comments. Is there anything specific you are particularly interested in seeing merged?
The thread-safety stuff is the part that I personally care about the most.
Thread-safety & reconnects for me.
Ping.
Hey Guys! I would love thread safety too!
Ping
+1 also for reconnection / thread safety
@earl : is it because the PR is too big that you hesitate in going forward towards this ? how could we help you with it mate ?
Thanks