def state_changed(self, oldstate, newstate, event, *args, **kwargs): """ This method intended to catch the moment when automat's state was changed. """ global_state.set_global_state('FIREHIRE ' + newstate) if newstate == 'READY' and event != 'instant': self.automat('instant')
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state('NETWORK ' + newstate) if driver.is_on('service_p2p_hookups'): from p2p import p2p_connector from system import tray_icon p2p_connector.A('network_connector.state', newstate) tray_icon.state_changed(self.state, p2p_connector.A().state)
def state_changed(self, oldstate, newstate, event, *args, **kwargs): """ This method is called every time when my state is changed. """ global_state.set_global_state('MONITOR ' + newstate) if newstate == 'READY': self.automat('instant')
def state_changed(self, oldstate, newstate, event, arg): """ This method is called every time when my state is changed. """ global_state.set_global_state('MONITOR ' + newstate) if newstate == 'READY': self.automat('instant')
def state_changed(self, oldstate, newstate, event, arg): """ This method intended to catch the moment when automat's state were changed. """ global_state.set_global_state('FIREHIRE ' + newstate) if newstate == 'READY': self.automat('instant')
def state_changed(self, oldstate, newstate, event, *args, **kwargs): global_state.set_global_state('NETWORK ' + newstate) if driver.is_on('service_p2p_hookups'): from p2p import p2p_connector from system import tray_icon p2p_connector.A('network_connector.state', newstate) tray_icon.state_changed(self.state, p2p_connector.A().state) if oldstate != 'CONNECTED' and newstate == 'CONNECTED': # TODO: redesign the state machine to cover that if self.last_bytes_in_counter < p2p_stats.get_total_bytes_in(): lg.info('HELLO BITDUST WORLD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') else: lg.warn('SEEMS I AM OFFLINE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') self.last_bytes_in_counter = p2p_stats.get_total_bytes_in()
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state('SHUTDOWN ' + newstate) initializer.A('shutdowner.state', newstate)
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state('INIT ' + newstate)
def state_changed(self, oldstate, newstate, event, *args, **kwargs): global_state.set_global_state('INIT ' + newstate)
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state('ID_RESTORE ' + newstate) from main import installer installer.A('id_restorer.state', newstate)
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state('DATASEND ' + newstate)
def state_changed(self, oldstate, newstate, event, *args, **kwargs): global_state.set_global_state('P2P ' + newstate) if newstate == 'INCOMMING?': self.automat('instant')
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state('INSTALL ' + newstate) initializer.A('installer.state', newstate)
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state('INSTALL ' + newstate) initializer.A('installer.state', newstate) if not settings.NewWebGUI(): from web import webcontrol reactor.callLater(0, webcontrol.OnUpdateInstallPage)
def state_changed(self, oldstate, newstate, event, arg): global_state.set_global_state("INIT " + newstate)