o.s.s.botService(service.MultiService) : class documentation

Part of otfbot.services.scheduler View Source View In Hierarchy

Wrapper class for the scheduling functions of twisted.internet.reactor.ReactorTime
Method __init__ Undocumented
Method callLater executes function after time seconds with arguments *args and keyword arguments **kwargs
Method cancelCallLater cancel a delayed call
Method callPeriodic executes function every delay seconds with keyword arguments **kwargs
Method callAtDatetime executes function at datetime dt with arguments *args and keyword arguments **kwargs

Inherited from MultiService:

Method privilegedStartService Do preparation work for starting the service.
Method startService Start the service.
Method stopService Stop the service.
Method getServiceNamed Get the child service with a given name.
Method __iter__ Get an iterator over all child services.
Method addService Add a child service.
Method removeService Remove a child service.

Inherited from Service (via MultiService):

Method __getstate__ Undocumented
Method setName Set the name of the service.
Method setServiceParent Set the parent of the service.
Method disownServiceParent Use this API to remove an IService from an IServiceCollection.
def __init__(self, root, parent): (source)
Undocumented
def callLater(self, time, function, *args, **kwargs): (source)
executes function after time seconds with arguments *args and keyword arguments **kwargs
Parameterstimeseconds to wait before executing function (type: int )
functionthe function to call (type: callable )
*argsarguments for the function (type: tuple )
**kwargskeyworded arguments for the function (type: dict )
def cancelCallLater(self, callID): (source)
cancel a delayed call
ParameterscallIDthe call to cancel (id returned in callLater)
def callPeriodic(self, delay, function, kwargs={}): (source)
executes function every delay seconds with keyword arguments **kwargs
Parametersdelaythe delay between two runs of the function (type: int )
functionthe function to be called (type: callable )
kwargsthe keyworded arguments for the function (type: dict )
Noteadd the possibility to give a *args-tuple (need to know how to merge two tuples)

if the function returns a value which evaluates to False, the periodic call will be canceled

def callAtDatetime(self, dt, function, *args, **kwargs): (source)
executes function at datetime dt with arguments *args and keyword arguments **kwargs
Parametersdtdatetime object with the time when to execute function (type: datetime )
functionthe function to call (type: callable )
*argsarguments for the function (type: tuple )
**kwargskeyworded arguments for the function (type: dict )
API Documentation for OtfBot, generated by pydoctor at 2011-05-03 16:14:29.