def __init__(self, fn, *args, **kwargs): if _debug: TimeoutTask._debug("__init__ %r %r %r", fn, args, kwargs) OneShotTask.__init__(self) # save the function and args self.fn = fn self.args = args self.kwargs = kwargs
def __init__(self, binary_obj): if _debug: MinOnOffTask._debug("__init__ %s", repr(binary_obj)) OneShotTask.__init__(self) # save a reference to the object self.binary_obj = binary_obj # listen for changes to the present value self.binary_obj._property_monitors['presentValue'].append(self.present_value_change)
def __init__(self, sched_obj): if _debug: LocalScheduleInterpreter._debug("__init__ %r", sched_obj) OneShotTask.__init__(self) # reference the schedule object to update self.sched_obj = sched_obj # add a monitor for the present value sched_obj._property_monitors['presentValue'].append(self.present_value_changed) # call to interpret the schedule deferred(self.process_task)
def __init__(self, obj_ref, client_addr, proc_id, obj_id, confirmed, lifetime): if _debug: Subscription._debug("__init__ %r %r %r %r %r %r", obj_ref, client_addr, proc_id, obj_id, confirmed, lifetime) OneShotTask.__init__(self) # save the reference to the related object self.obj_ref = obj_ref # save the parameters self.client_addr = client_addr self.proc_id = proc_id self.obj_id = obj_id self.confirmed = confirmed self.lifetime = lifetime # add ourselves to the subscription list for this object obj_ref._cov_subscriptions.append(self) # add ourselves to the list of all active subscriptions obj_ref._app.active_cov_subscriptions.append(self) # if lifetime is non-zero, schedule the subscription to expire if lifetime != 0: self.install_task(delta=self.lifetime)
def __init__(self): if _debug: SampleOneShotTask._debug("__init__") OneShotTask.__init__(self) self.process_task_called = []
def __init__(self): if _debug: SampleOneShotTask._debug("__init__") OneShotTask.__init__(self) self.process_task_called = 0