def _aggregate_issues(conf, main_section, target, queue, service_name):
start = time.time()<EOL>try:<EOL><INDENT>service = get_service(service_name)(conf, main_section, target)<EOL>issue_count = <NUM_LIT:0><EOL>for issue in service.issues():<EOL><INDENT>queue.put(issue)<EOL>issue_count += <NUM_LIT:1><EOL><DEDENT><DEDENT>except SystemExit as e:<EOL><INDENT>log.critical(str(e))<EOL>queue.put((SERVICE_FINISHED_ERROR, (target, e)))<EOL><DEDENT>except BaseException as e:<EOL><INDENT>if hasattr(e, '<STR_LIT>') and e.request:<EOL><INDENT>e.request.hooks = {}<EOL><DEDENT>log.exception("<STR_LIT>" % (target, e))<EOL>queue.put((SERVICE_FINISHED_ERROR, (target, e)))<EOL><DEDENT>else:<EOL><INDENT>queue.put((SERVICE_FINISHED_OK, (target, issue_count, )))<EOL><DEDENT>finally:<EOL><INDENT>duration = time.time() - start<EOL>log.info("<STR_LIT>" % (target, duration))<EOL><DEDENT>
This worker function is separated out from the main
    :func:`aggregate_issues` func only so that we can use multiprocessing
    on it for speed reasons.