TaskKit.TaskHandler | index /usr/local/share/webware/TaskKit/TaskHandler.py

Classes

``

__builtin__.object
  TaskHandler

class TaskHandler(__builtin__.object)
`` | `The task handler. While the Task class only knows what task to perform with the run()-method, the TaskHandler has all the knowledge about the periodicity of the task. Instances of this class are managed by the Scheduler in the scheduled, running and onDemand dictionaries.`

Methods defined here:

__init__(self, scheduler, start, period, task, name)

disable(self)
  `Disable future invocations of this task.`

enable(self)
  `Enable future invocations of this task.`

isOnDemand(self)
  `Return True if this task is not scheduled for periodic execution.`

isRunning(self)

name(self)

notifyCompletion(self)

notifyFailure(self)

period(self)
  `Return the period of this task.`

reschedule(self)
  `Determine whether this task should be rescheduled.
  Increments the startTime and returns true if this is
  a periodically executed task.`

reset(self, start, period, task, reregister)

runAgain(self)
  `Determine whether this task should be run again.
  This method lets the Scheduler check to see whether this task should be
  re-run when it terminates.`

runOnCompletion(self)
  `Request that this task be re-run after its current completion.
  Intended for on-demand tasks that are requested by the Scheduler while
  they are already running.`

runTask(self)
  `Run this task in a background thread.`

setPeriod(self, period)
  `Change the period for this task.`

startTime(self, newTime=None)

stop(self)

unregister(self)
  `Request that this task not be kept after its current completion.
  Used to remove a task from the scheduler.`

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Functions

``

time(...)
  `time() -> floating point number
  Return the current time in seconds since the Epoch.
  Fractions of a second may be present if the system clock provides them.`