mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Base SQL metrics in MetricsWorker (#2002)
* feat: Add metrics worker * refactor: Add todos for useful for metrics methods * feat: Run MetricsWorker is Prometheus is Enabled * refactor: Unused low-level variable was removed in metrics * feat: No worker for metrics, add more * refactor: Unnecessary todo removed * refactor: Remove dead unused constant * Reduce metrics public interface Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
d31faf5249
commit
457e1fc97b
4 changed files with 129 additions and 0 deletions
|
@ -151,8 +151,10 @@ func (s *scanner) RescanAll(ctx context.Context, fullRescan bool) error {
|
|||
}
|
||||
if hasError {
|
||||
log.Error("Errors while scanning media. Please check the logs")
|
||||
core.WriteAfterScanMetrics(ctx, s.ds, false)
|
||||
return ErrScanError
|
||||
}
|
||||
core.WriteAfterScanMetrics(ctx, s.ds, true)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue