beanstalkc icon indicating copy to clipboard operation
beanstalkc copied to clipboard

A lot of miscellaneous work

Open PeterScott opened this issue 14 years ago • 12 comments

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.

PeterScott avatar Jan 23 '11 00:01 PeterScott

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.

earl avatar Jan 28 '11 02:01 earl

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 typically None, unless set by the user)

earl avatar Jan 28 '11 03:01 earl

Any updates on this?

arturhoo avatar Aug 10 '11 13:08 arturhoo

I would also love to see these fixes merged.

Thanks.

dsully avatar Feb 24 '12 22:02 dsully

Any update here?

dlo avatar Mar 22 '12 18:03 dlo

Dan and Dan, thanks for your comments. Is there anything specific you are particularly interested in seeing merged?

earl avatar Mar 22 '12 23:03 earl

The thread-safety stuff is the part that I personally care about the most.

PeterScott avatar Mar 23 '12 00:03 PeterScott

Thread-safety & reconnects for me.

dsully avatar Mar 23 '12 02:03 dsully

Ping.

dsully avatar Dec 13 '12 18:12 dsully

Hey Guys! I would love thread safety too!

hurrycane avatar Mar 16 '13 10:03 hurrycane

Ping

hit9 avatar Jul 29 '14 08:07 hit9

+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

ultrabug avatar Aug 12 '14 09:08 ultrabug