示例#1
0
def plugin(client, bm_client, parser, bg_system, bg_instance):
    plugin = Plugin(client,
                    bg_host="localhost",
                    system=bg_system,
                    metadata={"foo": "bar"})
    plugin.instance = bg_instance
    plugin.bm_client = bm_client
    plugin.parser = parser

    return plugin
示例#2
0
def plugin(client, bm_client, parser, bg_system, bg_instance, admin_consumer,
           request_consumer):
    plugin = Plugin(
        client,
        bg_host="localhost",
        system=bg_system,
        metadata={"foo": "bar"},
        max_concurrent=1,
    )
    plugin.instance = bg_instance
    plugin.bm_client = bm_client
    plugin.parser = parser
    plugin.admin_consumer = admin_consumer
    plugin.request_consumer = request_consumer
    plugin.queue_connection_params = {}

    return plugin