#NEWLINE# def startSharedState( self ) : #NEWLINE# #INDENT# cacheDir = Setup . config ( ) . getConfigValue ( 'SHARED_STATE_CACHE' , os . path . join ( Setup . config ( ) . fakeAwsBaseDir , 'ss_cache' ) ) #NEWLINE# logging . info ( "Starting shared state with cache dir '%s' and log file '%s'" , cacheDir , self . sharedStateLogFile ) #NEWLINE# with DirectoryScope . DirectoryScope ( self . sharedStatePath ) : #NEWLINE# #INDENT# args = [ 'forever' , '--killSignal' , 'SIGTERM' , '-l' , self . sharedStateLogFile , 'start' , '-c' , 'python' , self . sharedStateMainline , '--cacheDir' , cacheDir , '--logging' , 'info' ] #NEWLINE# def sharedStateStdout( msg ) : #NEWLINE# #INDENT# logging . info ( 'SHARED STATE OUT> %s' , msg ) #NEWLINE# #UNINDENT# def sharedStateStderr( msg ) : #NEWLINE# #INDENT# logging . info ( 'SHARED STATE ERR> %s' , msg ) #NEWLINE# #UNINDENT# startSharedState = SubprocessRunner . SubprocessRunner ( args , sharedStateStdout , sharedStateStderr , dict ( os . environ ) ) #NEWLINE# startSharedState . start ( ) #NEWLINE# startSharedState . wait ( 60.0 ) #NEWLINE# startSharedState . stop ( )