Exemplo n.º 1
0
def run():
    sync_all_nodes()
    paste_conf = os.path.join(os.sep, 'etc', 'bareon-api', 'bareon-api-paste.ini')
    if not os.path.lexists(paste_conf):
        paste_conf = os.path.join(current_dir, '..', 'etc', 'bareon', 'bareon-api-paste.ini')

    application = deploy.loadapp(
        'config:{paste_conf}'.format(paste_conf=paste_conf),
        name='main',
        relative_to='.')

    httpserver.serve(application, host=CONF.host_ip, port=CONF.port)
Exemplo n.º 2
0
 def post(self):
     sync_all_nodes()