#NEWLINE# def create_connection( self ) : #NEWLINE# #INDENT# attempts = 0 #NEWLINE# while True : #NEWLINE# #INDENT# attempts += 1 #NEWLINE# try : #NEWLINE# #INDENT# self . connection = Connection ( '127.0.0.1' , 'guest' , 'guest' ) #NEWLINE# break #NEWLINE# #UNINDENT# except amqpstorm . AMQPError as why : #NEWLINE# #INDENT# LOGGER . exception ( why ) #NEWLINE# if ( attempts . max_retries and ( attempts > self . max_retries ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# time . sleep ( min ( ( attempts * 2 ) , 30 ) ) #NEWLINE# #UNINDENT# except KeyboardInterrupt : #NEWLINE# #INDENT# break