[CalendarServer-changes] [11156] CalendarServer/trunk/calendarserver/tools/workitems.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 9 07:17:09 PDT 2013
Revision: 11156
http://trac.calendarserver.org//changeset/11156
Author: cdaboo at apple.com
Date: 2013-05-09 07:17:09 -0700 (Thu, 09 May 2013)
Log Message:
-----------
Update for scheduling-in-store changes.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/workitems.py
Modified: CalendarServer/trunk/calendarserver/tools/workitems.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/workitems.py 2013-05-08 21:03:42 UTC (rev 11155)
+++ CalendarServer/trunk/calendarserver/tools/workitems.py 2013-05-09 14:17:09 UTC (rev 11156)
@@ -28,7 +28,7 @@
from twisted.application.service import Service
from calendarserver.push.notifier import PushNotificationWork
from twistedcaldav.directory.directory import GroupCacherPollingWork
-from twistedcaldav.scheduling.imip.inbound import IMIPPollingWork, IMIPReplyWork
+from txdav.caldav.datastore.scheduling.imip.inbound import IMIPPollingWork, IMIPReplyWork
def usage(e=None):
@@ -84,6 +84,8 @@
utilityMain(configFileName, WorkItemMonitorService, verbose=debug)
+
+
class WorkItemMonitorService(Service):
def __init__(self, store):
@@ -98,6 +100,7 @@
self.updateScreenGeometry()
self.reactor.callLater(0, self.updateDisplay)
+
def updateScreenGeometry(self):
for win in self.windows:
del win
@@ -113,10 +116,10 @@
# Specify row and column for each window as though it is a cell in an invisible html table
# Itemize windows in ascending order by row, col
for title, height, width, row, col, workItemClass, fmt, attrs in (
- ("Group Membership Indexing", "10%", "50%", 1, 1, GroupCacherPollingWork, "", ()),
- ("IMIP Reply Polling", "10%", "50%", 1, 2, IMIPPollingWork, "", ()),
- ("IMIP Reply Processing", "20%", "100%", 2, 1, IMIPReplyWork, "%s %s", ("organizer", "attendee")),
- ("Push Notifications", "69%", "100%", 3, 1, PushNotificationWork, "%s", ("pushID",)),
+ ("Group Membership Indexing", "10%", "50%", 1, 1, GroupCacherPollingWork, "", ()),
+ ("IMIP Reply Polling", "10%", "50%", 1, 2, IMIPPollingWork, "", ()),
+ ("IMIP Reply Processing", "20%", "100%", 2, 1, IMIPReplyWork, "%s %s", ("organizer", "attendee")),
+ ("Push Notifications", "69%", "100%", 3, 1, PushNotificationWork, "%s", ("pushID",)),
):
if (isinstance(height, basestring)):
height = max(int(winY * (float(height.strip("%")) / 100.0)), 3)
@@ -144,6 +147,8 @@
self.reactor.callLater(1, self.updateDisplay)
+
+
class WorkWindow(object):
def __init__(self, nlines, ncols, begin_y, begin_x,
store, title, workItemClass, fmt, attrs):
@@ -155,6 +160,7 @@
self.fmt = fmt
self.attrs = attrs
+
@inlineCallbacks
def update(self):
self.window.erase()
@@ -178,7 +184,7 @@
except Exception, e:
s = "Error: %s" % (str(e),)
try:
- self.window.addnstr(y, x, s, self.ncols-2)
+ self.window.addnstr(y, x, s, self.ncols - 2)
except curses.error:
pass
y += 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130509/f0120b8b/attachment.html>
More information about the calendarserver-changes
mailing list