[CalendarServer-changes] [8827] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 8 13:27:40 PST 2012


Revision: 8827
          http://trac.macosforge.org/projects/calendarserver/changeset/8827
Author:   sagen at apple.com
Date:     2012-03-08 13:27:40 -0800 (Thu, 08 Mar 2012)
Log Message:
-----------
Makes principal-property-search results limit configurable via plist

Modified Paths:
--------------
    CalendarServer/trunk/conf/caldavd-test.plist
    CalendarServer/trunk/twistedcaldav/extensions.py
    CalendarServer/trunk/twistedcaldav/stdconfig.py

Modified: CalendarServer/trunk/conf/caldavd-test.plist
===================================================================
--- CalendarServer/trunk/conf/caldavd-test.plist	2012-03-08 06:19:14 UTC (rev 8826)
+++ CalendarServer/trunk/conf/caldavd-test.plist	2012-03-08 21:27:40 UTC (rev 8827)
@@ -172,7 +172,6 @@
     <key>MaxInstancesForRRULE</key>
     <integer>400</integer>
 
-
     <!--
         Directory service
 
@@ -970,6 +969,10 @@
       <false/>
     </dict>
 
+    <!-- Maximum number of results returned by principal-property-search REPORT -->
+    <key>MaxPrincipalSearchReportResults</key>
+    <integer>500</integer>
+
     <!--
         Twisted
       -->

Modified: CalendarServer/trunk/twistedcaldav/extensions.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/extensions.py	2012-03-08 06:19:14 UTC (rev 8826)
+++ CalendarServer/trunk/twistedcaldav/extensions.py	2012-03-08 21:27:40 UTC (rev 8827)
@@ -59,7 +59,6 @@
 )
 from twisted.internet.defer import gatherResults
 from twext.web2.dav.method import prop_common
-from twext.web2.dav.method.report import max_number_of_matches
 
 from twext.python.log import Logger, LoggingMixIn
 
@@ -70,7 +69,9 @@
 from twistedcaldav.directory.directory import DirectoryService
 from twistedcaldav.method.report import http_REPORT
 
+from twistedcaldav.config import config
 
+
 thisModule = getModule(__name__)
 
 log = Logger()
@@ -422,7 +423,7 @@
                     if clientLimit is not None and matchcount >= clientLimit:
                         resultsWereLimited = ("client", matchcount)
                         break
-                    if matchcount >= max_number_of_matches:
+                    if matchcount >= config.MaxPrincipalSearchReportResults:
                         resultsWereLimited = ("server", matchcount)
                         break
 

Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py	2012-03-08 06:19:14 UTC (rev 8826)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py	2012-03-08 21:27:40 UTC (rev 8827)
@@ -780,6 +780,9 @@
     "MaxMultigetWithDataHrefs": 5000,
     "MaxQueryWithDataResults": 1000,
 
+    # How many results to return for principal-property-search REPORT requests
+    "MaxPrincipalSearchReportResults": 500,
+
     #
     # Localization
     #
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120308/cbb64a47/attachment.html>


More information about the calendarserver-changes mailing list