Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@web.simple_get
def task_wait(self, request, app, uuid):
return {"result": AsyncResult(uuid).get()}
@web.simple_get
def task_result(self, request, app, uuid):
return {"result": AsyncResult(uuid).result}
@web.simple_get
def instance_stats(self, request, app, name):
return nodes.stats(name)
@web.simple_get
def task_state(self, request, app, uuid):
return {"state": AsyncResult(uuid).state}
@web.simple_get
def ping(self, request):
return {"ok": "pong"}