mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +00:00
feat(gallery): display job status also during navigation (#2151)
* feat(gallery): keep showing progress also when refreshing Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(intel-gpu): better defaults Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat: make it thread-safe Signed-off-by: mudler <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
parent
030d555995
commit
fb2a05ff43
6 changed files with 164 additions and 9 deletions
26
pkg/xsync/map_test.go
Normal file
26
pkg/xsync/map_test.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
package xsync_test
|
||||
|
||||
import (
|
||||
. "github.com/go-skynet/LocalAI/pkg/xsync"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("SyncMap", func() {
|
||||
|
||||
Context("Syncmap", func() {
|
||||
It("sets and gets", func() {
|
||||
m := NewSyncedMap[string, string]()
|
||||
m.Set("foo", "bar")
|
||||
Expect(m.Get("foo")).To(Equal("bar"))
|
||||
})
|
||||
It("deletes", func() {
|
||||
m := NewSyncedMap[string, string]()
|
||||
m.Set("foo", "bar")
|
||||
m.Delete("foo")
|
||||
Expect(m.Get("foo")).To(Equal(""))
|
||||
Expect(m.Exists("foo")).To(Equal(false))
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue