slamdring/slamdring.py
async def process_records(
    request_queue,
    response_queue,
    extractor,
    processor,
    ignore_exceptions
):
    """ Reads from the request queue in a loop, issues HTTP requests, and
        puts the responses on the response queue.

        Parameters:
            request_queue - The queue to read requests from.
            response_queue - The queue to put the responses on.
            extractor - A function that takes a request record and returns the
                request to perform.
            processor - A function that takes a request record and a response
                and creates a response record to pass to the writer.
    """
    async with aiohttp.ClientSession() as session:
        while True:
            request_record = await request_queue.get()

            request = extractor(request_record)

            try:
                async with session.get(request) as response:
                    read_response = await response.text()
                    # Add the response to the request record.
                    response_record = processor(request_record, read_response)

                    await response_queue.put(response_record)
                    request_queue.task_done()
            except Exception as e:
                if ignore_exceptions:
                    request_queue.task_done()
                    pass
                else:
                    sys.stderr.write("Exception raised: {}.\n".format(str(e)))
                    sys.exit(1)
 Reads from the request queue in a loop, issues HTTP requests, and
        puts the responses on the response queue.

        Parameters:
            request_queue - The queue to read requests from.
            response_queue - The queue to put the responses on.
            extractor - A function that takes a request record and returns the
                request to perform.
            processor - A function that takes a request record and a response
                and creates a response record to pass to the writer.
    
Reads from the request queue in a loop, issues HTTP requests, and
puts the responses on the response queue.

The queue to read requests from.
response_queue - The queue to put the responses on.
extractor - A function that takes a request record and returns the
request to perform.
processor - A function that takes a request record and a response
and creates a response record to pass to the writer.
Reads from the request queue in a loop issues HTTP requests and puts the responses on the response queue . The queue to read requests from . response_queue - The queue to put the responses on . extractor - A function that takes a request record and returns the request to perform . processor - A function that takes a request record and a response and creates a response record to pass to the writer .
async def process_records(
    request_queue,
    response_queue,
    extractor,
    processor,
    ignore_exceptions
):
    async with aiohttp.ClientSession() as session:
        while True:
            request_record = await request_queue.get()
            request = extractor(request_record)
            try:
                async with session.get(request) as response:
                    read_response = await response.text()
                    response_record = processor(request_record, read_response)
                    await response_queue.put(response_record)
                    request_queue.task_done()
            except Exception as e:
                if ignore_exceptions:
                    request_queue.task_done()
                    pass
                else:
                    sys.stderr.write("Exception raised: {}.\n".format(str(e)))
                    sys.exit(1)
async def process_records ( request_queue , response_queue , extractor , processor , ignore_exceptions ) : async with aiohttp . ClientSession ( ) as session : while True : request_record = await request_queue . get ( ) request = extractor ( request_record ) try : async with session . get ( request ) as response : read_response = await response . text ( ) response_record = processor ( request_record , read_response ) await response_queue . put ( response_record ) request_queue . task_done ( ) except Exception as e : if ignore_exceptions : request_queue . task_done ( ) pass else : sys . stderr . write ( "Exception raised: {}.\n" . format ( str ( e ) ) ) sys . exit ( 1 )
Reads from the request queue in a loop, issues HTTP requests, and
puts the responses on the response queue.
Reads from the request queue in a loop issues HTTP requests and puts the responses on the response queue .
""" Reads from the request queue in a loop, issues HTTP requests, and
        puts the responses on the response queue.

        Parameters:
            request_queue - The queue to read requests from.
            response_queue - The queue to put the responses on.
            extractor - A function that takes a request record and returns the
                request to perform.
            processor - A function that takes a request record and a response
                and creates a response record to pass to the writer.
    """ # Add the response to the request record.
request_queue
response_queue
extractor
processor
ignore_exceptions