コード例 #1
0
def asyncio_report_processor_thread(loop):  # pragma: no cover
    """
    Worker thread function to run the asyncio event loop.

    Creates a report processor and calls the run method.

    :param loop: event loop
    :returns None
    """
    processor = ReportProcessor()
    PROCESSOR_INSTANCES.append(processor)
    try:
        loop.run_until_complete(processor.run())
    except Exception:  # pylint: disable=broad-except
        pass
コード例 #2
0
ファイル: report_consumer.py プロジェクト: quipucords/yupana
def create_upload_report_consumer_loop(loop):
    """Initialize the report consumer class and run."""
    report_consumer = ReportConsumer()
    PROCESSOR_INSTANCES.append(report_consumer)
    report_consumer.run(loop)