restart fix + slack commands

This commit is contained in:
ari committed 2026-11-01 15:10:39 -05:00
1 parent e90c9f324b
commit 25fcf85855
22 files changed
+1077 -119

No files matched your search

+4 -2
View File
@@ -19,6 +19,7 @@ type FakeNode struct {
name string
Mu sync.Mutex
Runs map[string]bool
Outdated map[string]bool // machines that booted an older system; cleared on Start
Last node.StartSpec
Homes map[string][]byte
Files map[string][]byte
@@ -31,7 +32,7 @@ type FakeNode struct {
}
func NewFakeNode(name string) *FakeNode {
return &FakeNode{name: name, Runs: map[string]bool{}, Homes: map[string][]byte{}, Files: map[string][]byte{},
return &FakeNode{name: name, Runs: map[string]bool{}, Outdated: map[string]bool{}, Homes: map[string][]byte{}, Files: map[string][]byte{},
Exports: map[string]*fakeExport{}, Imports: map[string]*fakeImport{}, Usable: model.Size{MemoryMB: 8192, CPUs: 4}}
}
@@ -52,7 +53,7 @@ func (f *FakeNode) Running(context.Context) ([]node.RunningMachine, error) {
defer f.Mu.Unlock()
var out []node.RunningMachine
for m := range f.Runs {
out = append(out, node.RunningMachine{Name: m})
out = append(out, node.RunningMachine{Name: m, Outdated: f.Outdated[m]})
}
return out, nil
}
@@ -65,6 +66,7 @@ func (f *FakeNode) Start(_ context.Context, spec node.StartSpec) error {
f.Mu.Lock()
defer f.Mu.Unlock()
f.Last, f.Runs[spec.Machine] = spec, true
delete(f.Outdated, spec.Machine)
return nil
}
func (f *FakeNode) Poweroff(_ context.Context, machine string) error {