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

Method OnRetry

pkg/queue/task.go:304–316  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

302}
303
304func (t *DBTask) OnRetry(err error) {
305 t.mu.Lock()
306 defer t.mu.Unlock()
307
308 if t.Task != nil {
309 if t.Task.PublicState.ErrorHistory == nil {
310 t.Task.PublicState.ErrorHistory = make([]string, 0)
311 }
312
313 t.Task.PublicState.ErrorHistory = append(t.Task.PublicState.ErrorHistory, err.Error())
314 t.Task.PublicState.RetryCount++
315 }
316}
317
318func (t *DBTask) OnIterationComplete(d time.Duration) {
319 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