Skip to content

Commit

Permalink
feat(api): add ready endpoint to check output status
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 13, 2023
1 parent 7e35b7b commit 55e8b80
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/onnx_web/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,12 @@ def inpaint():
})


@app.route('/ready/<path:filename>')
def ready(filename):
@app.route('/ready')
def ready():
output_file = request.args.get('output', None)

return json_with_cors({
'ready': executor.futures.done(filename),
'ready': executor.futures.done(output_file),
})


Expand Down

0 comments on commit 55e8b80

Please sign in to comment.