[Zope-CVS] CVS: Products/Scheduler - IScheduler.py:1.2

Ken Manheimer klm@zope.com
Thu, 8 Aug 2002 17:16:37 -0400


Update of /cvs-repository/Products/Scheduler
In directory cvs.zope.org:/tmp/cvs-serv6879

Modified Files:
	IScheduler.py 
Log Message:
IScheduledEvent: Added an 'info' method to the interface, to be used
  for event-specific processing configuration.

  Made the 'when' attribute an explicit part of the interface.

  Clarified that the __call__() happens in the scheduler's acquisition
  context.


=== Products/Scheduler/IScheduler.py 1.1.1.1 => 1.2 ===
--- Products/Scheduler/IScheduler.py:1.1.1.1	Mon Jun 10 13:03:03 2002
+++ Products/Scheduler/IScheduler.py	Thu Aug  8 17:16:37 2002
@@ -55,6 +55,9 @@
     def __call__():
         """Execute the event.
 
+        (The event will be called the event in the scheduler's acquisition
+        context.)
+
         There is normally no return value. If there is an error and a
         retry is needed, then a time.time and a new event to do the
         retry should be returned as a tuple.
@@ -65,16 +68,18 @@
         """
 
     def next():
-        """Return the next sceduled time and event
+        """Return the next scheduled time and event
+
+        This method is used to implement recuring events.
+
+        If a time and event is returned, the event will be scheduled at the
+        indicated time.
+
+        If the reciever is a one-time event, or should otherwise no-longer
+        recur, then None is returned.
 
-        This method is used to implement recuring events. If an event
-        is returned, it should be a new event, which will be scheduled
-        at the returned time. If the reciever is a one-time event or
-        should no-longer recur, then None should be returned.
-
-        Note that this method may be called multiple times without
-        executing the returned event to build representations of event
-        schedules.
+        Note that this method may be called multiple times without executing
+        the returned event to build representations of event schedules.
         """
 
     def getTime():
@@ -82,11 +87,20 @@
         Return the time that this event wants to be scheduled for
         """
 
+    def info():
+        """
+        Return a string describing the tasks event-specific processing details.
+        """
+
     description = Attribute(
         """Short description of the event
         
         This should include what the event does and, if the event is
         recuring, how the event recurs.
+        """)
+
+    when = Attribute(
+        """Time the event is scheduled for.
         """)
 
 class IDescheduledEvent(IFilterableEvent):