[Zope-CVS] CVS: Products/QueueCatalog - QueueCatalog.py:1.16
Kiran Jonnalagadda
jace at pobox.com
Sat Jan 31 14:55:24 EST 2004
Update of /cvs-repository/Products/QueueCatalog
In directory cvs.zope.org:/tmp/cvs-serv17277
Modified Files:
QueueCatalog.py
Log Message:
Corrected a permission declaration typo for manage_size.
Modified manage_queue to display a list of queued items (limit 100 items).
=== Products/QueueCatalog/QueueCatalog.py 1.15 => 1.16 ===
--- Products/QueueCatalog/QueueCatalog.py:1.15 Thu Nov 6 17:11:42 2003
+++ Products/QueueCatalog/QueueCatalog.py Sat Jan 31 14:54:53 2004
@@ -392,10 +392,26 @@
'Properties+changed' % self.absolute_url())
+ security.declareProtected(manage_zcatalog_entries,
+ 'list_queue_items')
+ def list_queue_items(self, limit=100):
+ """Return a list of items in the queue."""
+ items = []
+ count = 0
+ for queue in filter(None, self._queues):
+ qitems = queue._data.keys()
+ count += len(qitems)
+ items += qitems
+ if limit is not None:
+ if count > limit:
+ items = items[:limit]
+ return items
+
+
security.declareProtected(manage_zcatalog_entries, 'manage_queue')
manage_queue = DTMLFile('dtml/queue', globals())
- security.declareProtected(manage_zcatalog_entries, 'manage_process')
+ security.declareProtected(manage_zcatalog_entries, 'manage_size')
def manage_size(self):
size = 0
for q in self._queues:
More information about the Zope-CVS
mailing list