#NEWLINE# def run( self ) : #NEWLINE# #INDENT# '\n        Called when process initializes.\n        ' #NEWLINE# logger . info ( 'started roomba' ) #NEWLINE# while 1 : #NEWLINE# #INDENT# now = time ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . redis_conn . ping ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# logger . error ( ( "roomba can't connect to redis at socket path %s" % settings . REDIS_SOCKET_PATH ) ) #NEWLINE# sleep ( 10 ) #NEWLINE# self . redis_conn = StrictRedis ( unix_socket_path = settings . REDIS_SOCKET_PATH ) #NEWLINE# continue #NEWLINE# #UNINDENT# pids = [ ] #NEWLINE# for i in range ( 1 , ( settings . ROOMBA_PROCESSES + 1 ) ) : #NEWLINE# #INDENT# if ( not self . skip_mini ) : #NEWLINE# #INDENT# p = Process ( target = self . vacuum , args = ( i , settings . MINI_NAMESPACE , ( settings . MINI_DURATION + settings . ROOMBA_GRACE_TIME ) ) ) #NEWLINE# pids . append ( p ) #NEWLINE# p . start ( ) #NEWLINE# #UNINDENT# p = Process ( target = self . vacuum , args = ( i , settings . FULL_NAMESPACE , ( settings . FULL_DURATION + settings . ROOMBA_GRACE_TIME ) ) ) #NEWLINE# pids . append ( p ) #NEWLINE# p . start ( ) #NEWLINE# #UNINDENT# for p in now : #NEWLINE# #INDENT# p . join ( )