more files
All checks were successful
Build and Publish / Metadata (push) Successful in 8s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m26s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m2s

This commit is contained in:
matst80
2025-10-13 19:05:24 +02:00
parent f3e92c7d65
commit 91e398dcc3
3 changed files with 29 additions and 20 deletions

View File

@@ -70,8 +70,10 @@ func (s *DiskStorage[V]) save() {
}
}
}
s.queue.Delete(id)
return true
})
log.Print("Appended carts to disk")
}
func (s *DiskStorage[V]) logPath(id uint64) string {
@@ -102,7 +104,6 @@ func (s *DiskStorage[V]) Close() {
func (s *DiskStorage[V]) AppendEvent(id uint64, msg proto.Message) error {
if s.queue != nil {
queue := make([]QueueEvent, 0)
data, found := s.queue.Load(id)
if found {
@@ -112,7 +113,6 @@ func (s *DiskStorage[V]) AppendEvent(id uint64, msg proto.Message) error {
s.queue.Store(id, queue)
return nil
} else {
path := s.logPath(id)
fh, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {