Update pkg/task/metrics_store.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Robin Olsen
2026-03-04 14:02:48 +01:00
committed by GitHub
parent 4bb4dac4fd
commit 2fcd312072

View File

@@ -67,12 +67,9 @@ func (s *FileMetricsStore) Append(ctx context.Context, taskName string, run mode
return fmt.Errorf("write metrics file: %w", err)
}
if s.logger == nil {
return fmt.Errorf("logger is nil")
if s.logger != nil {
s.logger.Info("task metrics persisted", "path", s.path, "task", taskName, "run_id", run.RunID)
}
s.logger.Info("task metrics persisted", "path", s.path, "task", taskName, "run_id", run.RunID)
return nil
}