Serve and update models in the background from the console, and follow them under Jobs
The console starts a serve or update job over the admin API and stays, instead of closing to follow the download. Jobs lists them with their progress and steps; the sidebar counts those running. ctl model serve and update take --detach; ctl jobs lists jobs and follows one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d311a3ca4a
commit
e12996f7dd
12 files changed
+280
-34
No files matched your search
@@ -240,6 +240,22 @@ func (s *Server) Start(req Request) (Job, error) {
|
||||
return s.snapshot(j), nil
|
||||
}
|
||||
|
||||
// Jobs is every job since the control plane started, the newest first.
|
||||
func (s *Server) Jobs() []Job {
|
||||
s.mu.Lock()
|
||||
all := make([]*Job, 0, len(s.jobs))
|
||||
for _, j := range s.jobs {
|
||||
all = append(all, j)
|
||||
}
|
||||
s.mu.Unlock()
|
||||
out := make([]Job, 0, len(all))
|
||||
for _, j := range all {
|
||||
out = append(out, s.snapshot(j))
|
||||
}
|
||||
slices.SortFunc(out, func(a, b Job) int { return b.Started.Compare(a.Started) })
|
||||
return out
|
||||
}
|
||||
|
||||
// Get returns a job as it stands.
|
||||
func (s *Server) Get(id string) (Job, bool) {
|
||||
s.mu.Lock()
|
||||
|
||||
Reference in new issue
Block a user