Skip to content

Commit 1c24bb1

Browse files
authored
Merge pull request #19 from Quentin-M/feat/sleep_ttl
feat: use MakeIdle() instead of Stop() for TTL expiration to respect sleep mode
2 parents f9a99e0 + 43d3c8e commit 1c24bb1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

proxy/process.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ func (p *Process) startUnloadMonitoring() {
411411
}
412412

413413
if time.Since(p.getLastRequestHandled()) > maxDuration {
414-
p.proxyLogger.Infof("<%s> Unloading model, TTL of %ds reached", p.ID, p.config.UnloadAfter)
415-
p.Stop()
414+
p.proxyLogger.Infof("<%s> Making idle, TTL of %ds reached", p.ID, p.config.UnloadAfter)
415+
p.MakeIdle()
416416
return
417417
}
418418
}

0 commit comments

Comments
 (0)