#NEWLINE# def __init__( self , crawl_name , num_urls = DEFAULT_NUM_URLS ) : #NEWLINE# #INDENT# '\n        Create a NutchUrlTrails instance for visualizing a running Nutch crawl in real-time using Bokeh\n        :param name: The name of the crawl (as identified by the queue)\n        :param num_urls: The number of URLs to display in the visualization\n        :return: A NutchUrLTrails instance\n        ' #NEWLINE# self . crawl_name = crawl_name #NEWLINE# self . num_urls = num_urls #NEWLINE# self . open_urls = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . closed_urls = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . old_segments = None #NEWLINE# self . old_circles = None #NEWLINE# self . session = Session ( ) #NEWLINE# self . session . use_doc ( self . crawl_name ) #NEWLINE# self . document = Document ( ) #NEWLINE# con = Connection ( ) #NEWLINE# exchange = Exchange ( EXCHANGE_NAME , 'direct' , durable = False ) #NEWLINE# queue = Queue ( crawl_name , exchange = exchange , routing_key = crawl_name ) #NEWLINE# self . queue = con . SimpleQueue ( name = queue )