1
0
Fork 0

fix(api): run garbage collection after job errors

This commit is contained in:
Sean Sube 2023-02-09 22:04:33 -06:00
parent 45b09168dd
commit b3e4076775
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ from traceback import format_exception
from typing import Any, Callable, List, Optional, Tuple, Union
from .params import DeviceParams
from .utils import run_gc
logger = getLogger(__name__)
@ -197,6 +198,7 @@ class DevicePoolExecutor:
key,
format_exception(type(err), err, err.__traceback__),
)
run_gc()
future.add_done_callback(job_done)