mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
Model: Bypass lock checks when shutting down
Previously, when a SIGINT was emitted and a model load is running, the API didn't shut down until the load finished due to waitng for the lock. However, when shutting down, the lock doesn't matter since the process is being killed anyway. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -43,11 +43,11 @@ def load_progress(module, modules):
|
||||
yield module, modules
|
||||
|
||||
|
||||
async def unload_model(skip_wait: bool = False):
|
||||
async def unload_model(skip_wait: bool = False, shutdown: bool = False):
|
||||
"""Unloads a model"""
|
||||
global container
|
||||
|
||||
await container.unload(skip_wait=skip_wait)
|
||||
await container.unload(skip_wait=skip_wait, shutdown=shutdown)
|
||||
container = None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user