def stop(self): for name, state_var in self.service.get_variables().items(): state_var.unsubscribe_for_update(self._update_variable) # When called stop() manually, remove the before stop callback if not self.force_event_reload: reactor.rem_after_stop_func(self.looping_call.stop) self.looping_call.stop()
def stop(self): """ Stops the search. """ if self.is_running(): log.debug('Multicast event controller stopped') for name, state_var in list(self.service.get_variables().items()): if state_var.send_events and state_var.multicast: state_var.unsubscribe_for_update(self._update_variable) if not self.force_event_reload: self.l_call.stop() reactor.rem_after_stop_func(self.stop) self._is_running = False else: log.warning(self.msg_already_stopped)
def stop(self): """ Stops the search. """ if self.is_running(): log.debug('Multicast event controller stopped') for name, state_var in self.service.get_variables().items(): if state_var.send_events and state_var.multicast: state_var.unsubscribe_for_update(self._update_variable) if not self.force_event_reload: self.l_call.stop() reactor.rem_after_stop_func(self.stop) self._is_running = False else: log.warning(self.msg_already_stopped)