async def update_gitlab_loop(update_metrics, params):
    """
    app = Sanic()
    mserver = MetricsServer(app)
    mserver.add_task(update_gitlab_loop, params={'url': GITLAB_URL, 'token': token})
    """
    gitlab_api = gitlab.Gitlab(url=params['url'], private_token=params['token'], api_version=4)
    while True:
        try:
            metrics = update_gitlab_runners(gitlab_api)
            update_metrics(metrics)
        except Exception:
            update_metrics({})
            log.exception('During loop')
        await asyncio.sleep(LOOP)
app = Sanic()
    mserver = MetricsServer(app)
    mserver.add_task(update_gitlab_loop, params={'url': GITLAB_URL, 'token': token})