MCPcopy
hub / github.com/mudler/LocalAI / DeleteUUID

Method DeleteUUID

core/services/galleryop/operation.go:380–400  ·  view source on GitHub ↗
(uuid string)

Source from the content-addressed store, hash-verified

378}
379
380func (m *OpCache) DeleteUUID(uuid string) {
381 deleted := false
382 for _, k := range m.status.Keys() {
383 if m.status.Get(k) == uuid {
384 m.status.Delete(k)
385 m.backendOps.Delete(k) // Also clean up the backend flag
386 deleted = true
387 }
388 }
389 if !deleted {
390 return
391 }
392 m.mu.RLock()
393 nc := m.nats
394 m.mu.RUnlock()
395 if nc != nil {
396 if err := nc.Publish(messaging.SubjectGalleryOpEnd, OpCacheEvent{JobID: uuid}); err != nil {
397 xlog.Warn("OpCache failed to broadcast end", "job_id", uuid, "error", err)
398 }
399 }
400}
401
402func (m *OpCache) Map() map[string]string {
403 return m.status.Map()

Callers 3

GetStatusMethod · 0.95
RegisterUIAPIRoutesFunction · 0.80

Calls 4

KeysMethod · 0.80
GetMethod · 0.65
DeleteMethod · 0.65
PublishMethod · 0.65

Tested by

no test coverage detected