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

Method applyEnd

core/services/galleryop/operation.go:325–335  ·  view source on GitHub ↗

applyEnd removes any entries whose jobID matches the event. Idempotent.

(evt OpCacheEvent)

Source from the content-addressed store, hash-verified

323
324// applyEnd removes any entries whose jobID matches the event. Idempotent.
325func (m *OpCache) applyEnd(evt OpCacheEvent) {
326 if evt.JobID == "" {
327 return
328 }
329 for _, k := range m.status.Keys() {
330 if m.status.Get(k) == evt.JobID {
331 m.status.Delete(k)
332 m.backendOps.Delete(k)
333 }
334 }
335}
336
337func (m *OpCache) Set(key string, value string) {
338 m.status.Set(key, value)

Callers 1

StartMethod · 0.95

Calls 3

KeysMethod · 0.80
GetMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected