[CalendarServer-changes] [14643] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Apr 1 14:23:56 PDT 2015
Revision: 14643
http://trac.calendarserver.org//changeset/14643
Author: dre at apple.com
Date: 2015-04-01 14:23:55 -0700 (Wed, 01 Apr 2015)
Log Message:
-----------
Tolerate a memcache pool definition that has no MemcacheSocket; in that case fall back to TCP.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/caldav.py
CalendarServer/trunk/twistedcaldav/memcachepool.py
CalendarServer/trunk/twistedcaldav/stdconfig.py
Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py 2015-04-01 17:42:45 UTC (rev 14642)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py 2015-04-01 21:23:55 UTC (rev 14643)
@@ -1226,7 +1226,7 @@
"-U", "0",
]
# Use Unix domain sockets by default
- if pool.MemcacheSocket is not '':
+ if "MemcacheSocket" in pool:
memcachedArgv.extend([
"-s", str(pool.MemcacheSocket),
])
Modified: CalendarServer/trunk/twistedcaldav/memcachepool.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/memcachepool.py 2015-04-01 17:42:45 UTC (rev 14642)
+++ CalendarServer/trunk/twistedcaldav/memcachepool.py 2015-04-01 21:23:55 UTC (rev 14643)
@@ -447,7 +447,7 @@
from twisted.internet import reactor
for name, pool in pools.items():
if pool["ClientEnabled"]:
- if pool["MemcacheSocket"] is not '':
+ if "MemcacheSocket" in pool:
ep = UNIXClientEndpoint(reactor, pool["MemcacheSocket"])
else:
ep = GAIEndpoint(reactor, pool["BindAddress"], pool["Port"])
Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py 2015-04-01 17:42:45 UTC (rev 14642)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py 2015-04-01 21:23:55 UTC (rev 14643)
@@ -933,7 +933,7 @@
"Pools": {
"Default": {
# A unix socket used for communication with memcached.
- # If blank, then an AF_INET socket is used instead.
+ # If MemcacheSocket is absent, an AF_INET socket is used.
"MemcacheSocket": "memcache.sock",
"ClientEnabled": True,
"ServerEnabled": True,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150401/744ba32a/attachment.html>
More information about the calendarserver-changes
mailing list