apple / ccs-twistedextensions

Extensions to Twisted used by CalendarServer
https://www.calendarserver.org
Apache License 2.0
17 stars 29 forks source link

`ConnectionPool.__init__` should accept a `name` argument to initialize the service name #4

Closed macosforgebot closed 10 years ago

macosforgebot commented 10 years ago

exarkun@… originally submitted this as ticket:829


Named services are often somewhat handy. An IService with a non-None name attribute can be looked up by name on the MultiService that is its parent.

It's already possible to just set the name attribute on the ConnectionPool after instantiating it:

p = ConnectionPool(...)
p.name = "Some thing"

but it'd be a little bit easier and a little bit nicer if this could be passed to __init__:

p = ConnectionPool(..., name="Some thing")
macosforgebot commented 10 years ago

exarkun@… originally submitted this as attachment:connectionpool-name.patch:⁠ticket:829


add name parameter to ConnectionPool.__init__

macosforgebot commented 10 years ago

@wsanchez originally submitted this as comment:1:⁠ticket:829


r12231

macosforgebot commented 10 years ago

@wsanchez originally submitted this as comment:2:⁠ticket:829

macosforgebot commented 10 years ago

exarkun@… originally submitted this as comment:3:⁠ticket:829


Thank you!