fixed queueing with examples

This commit is contained in:
Abubakar Abid 2022-01-23 20:17:48 -05:00
parent 452d26b88c
commit 15791b1d1d

View File

@ -260,9 +260,8 @@ async def interpret(request: Request):
@app.post("/api/queue/push/", dependencies=[Depends(login_check)]) @app.post("/api/queue/push/", dependencies=[Depends(login_check)])
async def queue_push(request: Request): async def queue_push(request: Request):
body = await request.json() body = await request.json()
data = body["data"]
action = body["action"] action = body["action"]
job_hash, queue_position = queueing.push({"data": data}, action) job_hash, queue_position = queueing.push(body, action)
return {"hash": job_hash, "queue_position": queue_position} return {"hash": job_hash, "queue_position": queue_position}