Exemplo n.º 1
0
def main(config):
    # setup api/endpoint
    matrix = MatrixHttpApi(config.base_url, config.token)

    log.debug("Setting up plugins...")
    plugins = [
        ToDoPlugin,
        UrlPlugin,
        GuessNumberPlugin,
    ]

    # setup engine
    engine = Engine(matrix, config)
    for plugin in plugins:
        engine.add_plugin(plugin)

    engine.setup()

    while True:
        try:
            log.info("Listening for incoming events.")
            engine.event_loop()
        except Exception as e:
            log.error("Ruh roh: %s", e)
        time.sleep(5)
Exemplo n.º 2
0
def main(config):
    # setup api/endpoint
    matrix = MatrixHttpApi(config.base_url, config.token)

    log.debug("Setting up plugins...")
    plugins = [
        SmartHomePlugin
        # TimePlugin,
        # Base64Plugin,
        # GuessNumberPlugin,
        # #JiraPlugin,
        # UrlPlugin,
        # #GithubPlugin,
        # #JenkinsPlugin,
        # PrometheusPlugin,
    ]

    # setup engine
    engine = Engine(matrix, config)
    for plugin in plugins:
        engine.add_plugin(plugin)

    engine.setup()

    while True:
        try:
            log.info("Listening for incoming events.")
            engine.event_loop()
        except Exception as e:
            log.error("Ruh roh: %s", e)
        time.sleep(5)

    log.info("Terminating.")
Exemplo n.º 3
0
def main(config):
    # setup api/endpoint
    matrix = MatrixHttpApi(config.base_url, config.token)

    log.debug("Setting up plugins...")
    plugins = [
        TimePlugin,
        Base64Plugin,
        GuessNumberPlugin,
        JiraPlugin,
        UrlPlugin,
        GithubPlugin,
        JenkinsPlugin,
        PrometheusPlugin,
    ]

    # setup engine
    engine = Engine(matrix, config)
    for plugin in plugins:
        engine.add_plugin(plugin)

    engine.setup()

    while True:
        try:
            log.info("Listening for incoming events.")
            engine.event_loop()
        except Exception as e:
            log.error("Ruh roh: %s", e)
        time.sleep(5)

    log.info("Terminating.")