Пример #1
0
    def _on_bank_ready(self, result):
        """Called when the bank has finished starting.  Alerts the applications to any
    startup arguments that were passed in, which will likely cause them to actually start."""
        if result != True:
            log_msg("Bank failed to start correctly!", 0)
            return result

        #handle the starting arguments:
        Startup.handle_args(ProgramState.STARTING_DIR, sys.argv[1:])
        GlobalEvents.throw_event("startup")

        #if this is the first run, save all the settings files:
        if self.bbApp.isFirstRun:
            for app in [self.bbApp, self.btApp, self.torApp, self.ffApp]:
                if app:
                    app.settings.save()
        self.coreSettings.save()

        #schedule update function:
        def do_update():
            BWHistory.update_all()
            return True

        ProgramState.DO_UPDATES = True
        self.updateEvent = Scheduler.schedule_repeat(
            Globals.INTERVAL_BETWEEN_UPDATES, do_update)
        return result
Пример #2
0
 def _on_bank_ready(self, result):
   """Called when the bank has finished starting.  Alerts the applications to any
   startup arguments that were passed in, which will likely cause them to actually start."""
   if result != True:
     log_msg("Bank failed to start correctly!", 0)
     return result
     
   #handle the starting arguments:
   Startup.handle_args(ProgramState.STARTING_DIR, sys.argv[1:])
   GlobalEvents.throw_event("startup")
   
   #if this is the first run, save all the settings files:
   if self.bbApp.isFirstRun:
     for app in [self.bbApp, self.btApp, self.torApp, self.ffApp]:
       if app:
         app.settings.save()
   self.coreSettings.save()
    
   #schedule update function:
   def do_update():
     BWHistory.update_all()
     return True
   ProgramState.DO_UPDATES = True
   self.updateEvent = Scheduler.schedule_repeat(Globals.INTERVAL_BETWEEN_UPDATES, do_update)
   return result
Пример #3
0
 def __init__(self, conn, args):
     MessageServer.MessageServerHandler.__init__(self, conn, args)
     self.clientConn.sendMessage("SUCCESS")
     args = args.split("\n")
     startingDir = args.pop(0)
     decodedStartingDir = System.decode_from_filesystem(startingDir)
     Startup.handle_args(decodedStartingDir, args)
Пример #4
0
 def __init__(self, conn, args):
   MessageServer.MessageServerHandler.__init__(self, conn, args)
   self.clientConn.sendMessage("SUCCESS")
   args = args.split("\n")
   startingDir = args.pop(0)
   decodedStartingDir = System.decode_from_filesystem(startingDir)
   Startup.handle_args(decodedStartingDir, args)