add metaserver and use meta lookup service

This commit is contained in:
j 2014-05-22 11:06:30 +02:00
commit 5bbf612a38
6 changed files with 134 additions and 4 deletions

View file

@ -87,7 +87,11 @@ def api_task(app, request, callback):
f = actions.get(action)
if f:
with app.app_context():
response = f(data)
try:
response = f(data)
except:
logger.debug('FAILED %s %s', action, data, exc_info=1)
response = json_response(status=500, text='%s failed' % action)
else:
response = json_response(status=400, text='Unknown action %s' % action)
callback(response)