Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
48702dd1
Commit
48702dd1
authored
May 30, 2024
by
Daniel Hiltgen
Browse files
Harden unload for empty runners
parent
68dfc623
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
server/sched.go
server/sched.go
+4
-0
No files found.
server/sched.go
View file @
48702dd1
...
@@ -588,6 +588,10 @@ func (s *Scheduler) findRunnerToUnload() *runnerRef {
...
@@ -588,6 +588,10 @@ func (s *Scheduler) findRunnerToUnload() *runnerRef {
runnerList
=
append
(
runnerList
,
r
)
runnerList
=
append
(
runnerList
,
r
)
}
}
s
.
loadedMu
.
Unlock
()
s
.
loadedMu
.
Unlock
()
if
len
(
runnerList
)
==
0
{
slog
.
Debug
(
"no loaded runner to unload"
)
return
nil
}
// In the future we can enhance the algorithm to be smarter about picking the optimal runner to unload
// In the future we can enhance the algorithm to be smarter about picking the optimal runner to unload
// e.g., if we have multiple options, will one make room for the request?
// e.g., if we have multiple options, will one make room for the request?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment