MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / failWithError

Method failWithError

internal/search/reindex.go:152–163  ·  view source on GitHub ↗
(err error, phase string)

Source from the content-addressed store, hash-verified

150}
151
152func (r *ReindexService) failWithError(err error, phase string) (*ReindexProgress, error) {
153 r.mu.Lock()
154 now := time.Now()
155 r.progress.Status = "failed"
156 r.progress.Phase = phase
157 r.progress.CompletedAt = &now
158 r.progress.Errors = append(r.progress.Errors, err.Error())
159 r.mu.Unlock()
160
161 logrus.WithError(err).WithField("phase", phase).Error("Reindex operation failed")
162 return r.GetProgressPtr(), err
163}
164
165func (r *ReindexService) dropCollections(ctx context.Context) error {
166 r.updateProgress("drop_collections", 0, 0)

Callers 1

StartReindexMethod · 0.95

Calls 4

GetProgressPtrMethod · 0.95
LockMethod · 0.45
ErrorMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected