[CalendarServer-changes] [13698] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 27 12:24:29 PDT 2014
Revision: 13698
http://trac.calendarserver.org//changeset/13698
Author: cdaboo at apple.com
Date: 2014-06-27 12:24:29 -0700 (Fri, 27 Jun 2014)
Log Message:
-----------
Fixes for proper CDT runs.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/caldav.py
CalendarServer/trunk/requirements-dev.txt
CalendarServer/trunk/txdav/caldav/datastore/sql.py
Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py 2014-06-27 19:23:07 UTC (rev 13697)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py 2014-06-27 19:24:29 UTC (rev 13698)
@@ -881,6 +881,8 @@
if pool is not None:
pool.setServiceParent(result)
+ self._initJobQueue(None)
+
if config.ControlSocket:
id = config.ControlSocket
self.log.info("Control via AF_UNIX: {id}", id=id)
@@ -1281,23 +1283,7 @@
pool = PeerConnectionPool(
reactor, store.newTransaction, config.WorkQueue.ampPort
)
-
- # Initialize queue parameters from config settings
- for attr in (
- "queuePollInterval",
- "queueOverdueTimeout",
- "overloadLevel",
- "highPriorityLevel",
- "mediumPriorityLevel",
- ):
- setattr(pool, attr, getattr(config.WorkQueue, attr))
-
- for attr in (
- "failureRescheduleInterval",
- "lockRescheduleInterval",
- ):
- setattr(JobItem, attr, getattr(config.WorkQueue, attr))
-
+ self._initJobQueue(pool)
store.queuer = store.queuer.transferProposalCallbacks(pool)
pool.setServiceParent(result)
@@ -1886,6 +1872,7 @@
pool = PeerConnectionPool(
reactor, store.newTransaction, config.WorkQueue.ampPort
)
+ self._initJobQueue(pool)
store.queuer = store.queuer.transferProposalCallbacks(pool)
controlSocket.addFactory(
_QUEUE_ROUTE, pool.workerListenerFactory()
@@ -2008,7 +1995,34 @@
remove(checkSocket)
+ def _initJobQueue(self, pool):
+ """
+ Common job queue initialization
+ @param pool: the connection pool to init or L{None}
+ @type pool: L{PeerConnectionPool} or C{None}
+ """
+
+ # Initialize queue polling parameters from config settings
+ if pool is not None:
+ for attr in (
+ "queuePollInterval",
+ "queueOverdueTimeout",
+ "overloadLevel",
+ "highPriorityLevel",
+ "mediumPriorityLevel",
+ ):
+ setattr(pool, attr, getattr(config.WorkQueue, attr))
+
+ # Initialize job parameters from config settings
+ for attr in (
+ "failureRescheduleInterval",
+ "lockRescheduleInterval",
+ ):
+ setattr(JobItem, attr, getattr(config.WorkQueue, attr))
+
+
+
class TwistdSlaveProcess(object):
"""
A L{TwistdSlaveProcess} is information about how to start a slave process
Modified: CalendarServer/trunk/requirements-dev.txt
===================================================================
--- CalendarServer/trunk/requirements-dev.txt 2014-06-27 19:23:07 UTC (rev 13697)
+++ CalendarServer/trunk/requirements-dev.txt 2014-06-27 19:24:29 UTC (rev 13698)
@@ -7,4 +7,4 @@
mockldap
q
--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@13420#egg=CalDAVClientLibrary
---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@13686#egg=CalDAVTester
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@13695#egg=CalDAVTester
Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql.py 2014-06-27 19:23:07 UTC (rev 13697)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py 2014-06-27 19:24:29 UTC (rev 13698)
@@ -1923,7 +1923,7 @@
yield self.validAttendeeListSizeCheck(component, inserting)
# Check location/resource organizer requirement
- self.validLocationResourceOrganizer(component, inserting, internal_state)
+ yield self.validLocationResourceOrganizer(component, inserting, internal_state)
# Check access
if config.EnablePrivateEvents:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140627/138eab71/attachment.html>
More information about the calendarserver-changes
mailing list