返回 DeepSeek-Reasonix
reconcile_status.go
根目录 / internal / sessioncatalog / reconcile_status.go
1 package sessioncatalog
2
3 import "context"
4
5 func (c *Catalog) failDirectoryScan(ctx context.Context, path string, scanErr error) {
6 c.mutationMu.Lock()
7 _, _ = c.db.ExecContext(ctx, `UPDATE catalog_directories SET state='degraded',error=? WHERE path_key=?`, scanErr.Error(), c.pathKey(path))
8 c.mutationMu.Unlock()
9 c.statusMu.Lock()
10 c.status.State = StateDegraded
11 c.status.LastError = scanErr.Error()
12 c.statusMu.Unlock()
13 }
14
14 lines GO