예제 #1
0
 def RecordRunningStart( self ):
     
     self._last_shutdown_was_bad = HydrusData.LastShutdownWasBad( self.db_dir, self._name )
     
     self._i_own_running_file = True
     
     HydrusData.RecordRunningStart( self.db_dir, self._name )
예제 #2
0
 def Run( self ):
     
     HydrusData.RecordRunningStart( self.db_dir, 'server' )
     
     HydrusData.Print( 'Initialising db\u2026' )
     
     self.InitModel()
     
     HydrusData.Print( 'Initialising daemons\u2026' )
     
     self.InitView()
     
     HydrusData.Print( 'Server is running. Press Ctrl+C to quit.' )
     
     try:
         
         while not HG.model_shutdown and not self._shutdown:
             
             time.sleep( 1 )
             
         
     except KeyboardInterrupt:
         
         HydrusData.Print( 'Received a keyboard interrupt\u2026' )
         
     
     HydrusData.Print( 'Shutting down controller\u2026' )
     
     self.Exit()