add metaserver and use meta lookup service
This commit is contained in:
parent
f2221188ea
commit
5bbf612a38
6 changed files with 134 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue