#NEWLINE# def start( self ) : #NEWLINE# #INDENT# if ( not self . connection ) : #NEWLINE# #INDENT# self . create_connection ( ) #NEWLINE# #UNINDENT# while True : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# channel = self . connection . channel ( ) #NEWLINE# channel . queue . declare ( 'simple_queue' ) #NEWLINE# channel . basic . consume ( self , 'simple_queue' , no_ack = False ) #NEWLINE# channel . start_consuming ( to_tuple = False ) #NEWLINE# if ( not self . consumer_tags ) : #NEWLINE# #INDENT# channel . close ( ) #NEWLINE# #UNINDENT# #UNINDENT# except amqpstorm . AMQPError as why : #NEWLINE# #INDENT# LOGGER . exception ( why ) #NEWLINE# self . create_connection ( ) #NEWLINE# #UNINDENT# except KeyboardInterrupt : #NEWLINE# #INDENT# self . connection . close ( ) #NEWLINE# break