Skip to content

Commit

Permalink
Don't block on request_queue.put
Browse files Browse the repository at this point in the history
  • Loading branch information
TimKoornstra committed Jun 6, 2024
1 parent 02f8517 commit 5778d30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def predict() -> flask.Response:

try:
app.request_queue.put((image_file, group_id, identifier,
model, whitelist))
model, whitelist),
block=False)
except Full:
response = jsonify({
"status": "error",
Expand Down

0 comments on commit 5778d30

Please sign in to comment.