Skip to content

Commit

Permalink
fix(api): only consume one retry per error
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Nov 6, 2023
1 parent df8b4ab commit 911f87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/onnx_web/chain/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ def stage_tile(
break
except Exception:
logger.exception(
"error while running stage pipeline, retry %s of 3", i
"error while running stage pipeline, %s retries left", worker.retries
)
server.cache.clear()
run_gc([worker.get_device()])
worker.retries = worker.retries - (i + 1)
worker.retries = worker.retries - 1

if worker.retries <= 0:
raise RetryException("exhausted retries on stage")
Expand Down

0 comments on commit 911f87f

Please sign in to comment.