예제 #1
0
 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')
예제 #2
0
 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)
예제 #3
0
 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')
예제 #4
0
 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')
예제 #5
0
 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')
예제 #6
0
 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()
예제 #7
0
 def state_changed(self, oldstate, newstate, event, arg):
     global_state.set_global_state('SHUTDOWN ' + newstate)
     initializer.A('shutdowner.state', newstate)
예제 #8
0
 def state_changed(self, oldstate, newstate, event, arg):
     global_state.set_global_state('INIT ' + newstate)
예제 #9
0
 def state_changed(self, oldstate, newstate, event, *args, **kwargs):
     global_state.set_global_state('INIT ' + newstate)
예제 #10
0
 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)
예제 #11
0
 def state_changed(self, oldstate, newstate, event, arg):
     global_state.set_global_state('DATASEND ' + newstate)
예제 #12
0
 def state_changed(self, oldstate, newstate, event, *args, **kwargs):
     global_state.set_global_state('P2P ' + newstate)
     if newstate == 'INCOMMING?':
         self.automat('instant')
예제 #13
0
 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)
예제 #14
0
 def state_changed(self, oldstate, newstate, event, arg):
     global_state.set_global_state('SHUTDOWN ' + newstate)
     initializer.A('shutdowner.state', newstate)
예제 #15
0
 def state_changed(self, oldstate, newstate, event, arg):
     global_state.set_global_state('INSTALL ' + newstate)
     initializer.A('installer.state', newstate)
예제 #16
0
 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)
예제 #17
0
 def state_changed(self, oldstate, newstate, event, arg):
     global_state.set_global_state("INIT " + newstate)
예제 #18
0
 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)