MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / OnError

Method OnError

pkg/queue/task.go:294–302  ·  view source on GitHub ↗
(err error, d time.Duration)

Source from the content-addressed store, hash-verified

292}
293
294func (t *DBTask) OnError(err error, d time.Duration) {
295 t.mu.Lock()
296 defer t.mu.Unlock()
297
298 if t.Task != nil {
299 t.Task.PublicState.Error = err.Error()
300 t.Task.PublicState.ExecutedDuration += d
301 }
302}
303
304func (t *DBTask) OnRetry(err error) {
305 t.mu.Lock()

Callers

nothing calls this directly

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected