[CalendarServer-changes] [3828] CalendarServer/trunk/twistedcaldav/memcache.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 11 15:47:08 PDT 2009
Revision: 3828
http://trac.macosforge.org/projects/calendarserver/changeset/3828
Author: wsanchez at apple.com
Date: 2009-03-11 15:47:08 -0700 (Wed, 11 Mar 2009)
Log Message:
-----------
Update memcache.py from Twisted trunk (minor)
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/memcache.py
Modified: CalendarServer/trunk/twistedcaldav/memcache.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/memcache.py 2009-03-11 22:43:45 UTC (rev 3827)
+++ CalendarServer/trunk/twistedcaldav/memcache.py 2009-03-11 22:47:08 UTC (rev 3828)
@@ -1,5 +1,5 @@
# -*- test-case-name: twisted.test.test_memcache -*-
-# Copyright (c) 2007 Twisted Matrix Laboratories.
+# Copyright (c) 2007-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
@@ -162,7 +162,7 @@
Override sendLine to add a timeout to response.
"""
if not self._current:
- self.setTimeout(self.persistentTimeOut)
+ self.setTimeout(self.persistentTimeOut)
LineReceiver.sendLine(self, line)
@@ -589,15 +589,24 @@
return cmdObj._deferred
- def stats(self):
+ def stats(self, arg=None):
"""
Get some stats from the server. It will be available as a dict.
+ @param arg: An optional additional string which will be sent along
+ with the I{stats} command. The interpretation of this value by
+ the server is left undefined by the memcache protocol
+ specification.
+ @type arg: L{NoneType} or L{str}
+
@return: a deferred that will fire with a C{dict} of the available
statistics.
@rtype: L{Deferred}
"""
- self.sendLine("stats")
+ cmd = "stats"
+ if arg:
+ cmd = "stats " + arg
+ self.sendLine(cmd)
cmdObj = Command("stats", values={})
self._current.append(cmdObj)
return cmdObj._deferred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090311/9e01855f/attachment.html>
More information about the calendarserver-changes
mailing list