How to use the mqttwarn.context.FunctionInvoker function in mqttwarn

To help you get started, we’ve selected a few mqttwarn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jpmens / mqttwarn / mqttwarn / core.py View on Github external
def bootstrap(config=None, scriptname=None):
    # FIXME: Remove global variables
    global context, cf, SCRIPTNAME
    invoker = FunctionInvoker(config=config, srv=make_service(mqttc=mqttc, name='mqttwarn.context'))
    context = RuntimeContext(config=config, invoker=invoker)
    cf = config
    SCRIPTNAME = scriptname