Skip to content

Commit

Permalink
fix(api): run garbage collection after job errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 10, 2023
1 parent 45b0916 commit b3e4076
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/onnx_web/device_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import Any, Callable, List, Optional, Tuple, Union

from .params import DeviceParams
from .utils import run_gc

logger = getLogger(__name__)

Expand Down Expand Up @@ -197,6 +198,7 @@ def job_done(f: Future):
key,
format_exception(type(err), err, err.__traceback__),
)
run_gc()

future.add_done_callback(job_done)

Expand Down

0 comments on commit b3e4076

Please sign in to comment.