original_docstring: Queuer thread to request new URLs when the queue runs out.
docstring: Queuer thread to request new URLs when the queue runs out.
docstring_tokens: Queuer thread to request new URLs when the queue runs out .
code: def queuer_thread(self):
          """Queuer thread to request new URLs when the queue runs out."""
  
          while True:
  
              # Wait for the link queue to run out
              self.link_queue.join()
              print('Queuer: Requesting more URLs')
  
              # Get URLs from the server
              urls = []
              try:
                  urls = self.server.urls()
              except netexcept.InvalidUrlsPacketReceived:
                  print('Queuer: Error: Invalid URLS packet received', results[1], url)
                  self.error_event.set()
                  sys.exit(1)
              except netexcept.SocketClosed:
                  print('Queuer: Error: Socket closed')
                  self.error_event.set()
                  sys.exit(1)
     
              print('Queuer: New URLs:', urls)
  
              # Add them to the queue
              for link in urls:
                  self.link_queue.put((self.calculate_priority(link), link))
code_tokens: def queuer_thread ( self ) : while True : self . link_queue . join ( ) print ( 'Queuer: Requesting more URLs' ) urls = [ ] try : urls = self . server . urls ( ) except netexcept . InvalidUrlsPacketReceived : print ( 'Queuer: Error: Invalid URLS packet received' , results [ 1 ] , url ) self . error_event . set ( ) sys . exit ( 1 ) except netexcept . SocketClosed : print ( 'Queuer: Error: Socket closed' ) self . error_event . set ( ) sys . exit ( 1 ) print ( 'Queuer: New URLs:' , urls ) for link in urls : self . link_queue . put ( ( self . calculate_priority ( link ) , link ) )
short_docstring: Queuer thread to request new URLs when the queue runs out.
short_docstring_tokens: Queuer thread to request new URLs when the queue runs out .
comment: """Queuer thread to request new URLs when the queue runs out."""$SEP$# Wait for the link queue to run out$SEP$# Get URLs from the server$SEP$# Add them to the queue