Пример #1
0
def run():
    config = teeth_config.get_config()
    service.global_setup(config)
    api = agent.TeethAgentAPIServer(config)
    listen_address = (config.AGENT_API_HOST, config.AGENT_API_PORT)
    server = wsgiserver.CherryPyWSGIServer(listen_address, api)
    try:  # ^C doesn't work without this try/except
        server.start()
    except KeyboardInterrupt:
        server.stop()
Пример #2
0
def run():
    service.global_setup(teeth_config.get_config())
    for model in models.all_models:
        management.sync_table(model)