[Zope-CVS] CVS: Products/Scheduler - IScheduler.py:1.5
Ken Manheimer
klm@zope.com
Tue, 24 Sep 2002 20:08:54 -0400
Update of /cvs-repository/Products/Scheduler
In directory cvs.zope.org:/tmp/cvs-serv30436
Modified Files:
IScheduler.py
Log Message:
Register scheduler events, IScheduledEvent and ITimeEvent, with the
event registry.
=== Products/Scheduler/IScheduler.py 1.4 => 1.5 ===
--- Products/Scheduler/IScheduler.py:1.4 Thu Aug 15 12:48:33 2002
+++ Products/Scheduler/IScheduler.py Tue Sep 24 20:08:53 2002
@@ -21,6 +21,7 @@
from Interface import Attribute
from Products.Event.IEvent import IFilterableEvent
from Products.Event.ISubscriber import ISubscriber
+from Products.Event.EventRegistry import eventRegistry
class IScheduler(ISubscriber):
"""Schedule objects manage and fire scheduled events
@@ -48,6 +49,7 @@
"""
class IScheduledEvent(IFilterableEvent):
+ """Scheduler tick events."""
# XXX Maybe we need a way to return time deltas, so that we can
# say N seconds in the future, whenever that is.
@@ -104,6 +106,8 @@
Return the time scheduled for the event.
"""
+eventRegistry.registerEvent(IScheduledEvent, 'Schedule ticks')
+
class IDescheduledEvent(IFilterableEvent):
def getTime():
"""
@@ -111,6 +115,7 @@
"""
class ITimeEvent(Interface.Base):
+ """Event occurring at a moment in time."""
def getTime():
"""Get the event time.
@@ -118,3 +123,4 @@
The event time is a "time.time" value.
"""
+eventRegistry.registerEvent(ITimeEvent, 'Time ticks')