How to use the c2cwsgiutils.health_check function in c2cwsgiutils

To help you get started, we’ve selected a few c2cwsgiutils 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 camptocamp / tilecloud-chain / tilecloud_chain / server.py View on Github external
def main(global_config, **settings):
    from pyramid_mako import add_mako_renderer
    del global_config  # unused

    config = Configurator(settings=settings)

    init_tilegeneration(settings['tilegeneration_configfile'])
    global tilegeneration

    config.include(c2cwsgiutils.pyramid.includeme)
    health_check.HealthCheck(config)

    add_mako_renderer(config, ".html")

    config.add_route(
        'admin', '/{}/'.format(tilegeneration.config['server']['admin_path']),
        request_method='GET',
    )
    config.add_route(
        'admin_run', '/{}/run'.format(tilegeneration.config['server']['admin_path']),
        request_method='POST',
    )

    config.add_route('tiles', '/*path', request_method='GET')
    config.add_view(PyramidView, route_name='tiles')

    config.scan('tilecloud_chain.views')