diff --git a/pkg/internal/feed/feed_issue.go b/pkg/internal/feed/feed_issue.go index 0a0d6e81..f15a86e5 100644 --- a/pkg/internal/feed/feed_issue.go +++ b/pkg/internal/feed/feed_issue.go @@ -130,7 +130,7 @@ func (f *IssueFeed) Export(ctx context.Context, apiClient *httpapi.Client, expor status.IncrementStatus(f.Name(), int64(numRows), apiClient.Duration.Milliseconds()) l.With( - "estimated_remaining", resp.Metadata.RemainingRecords, + "downloaded", status.ReadCounter(f.Name()), "duration_ms", apiClient.Duration.Milliseconds(), "export_duration_ms", exporter.GetDuration().Milliseconds(), ).Info("export batch complete") diff --git a/pkg/internal/feed/feed_issue_timeline_item.go b/pkg/internal/feed/feed_issue_timeline_item.go index 5ee4a3f3..6877606c 100644 --- a/pkg/internal/feed/feed_issue_timeline_item.go +++ b/pkg/internal/feed/feed_issue_timeline_item.go @@ -122,7 +122,7 @@ func (f *IssueTimelineItemFeed) Export(ctx context.Context, apiClient *httpapi.C status.IncrementStatus(f.Name(), int64(numRows), apiClient.Duration.Milliseconds()) l.With( - "estimated_remaining", resp.Metadata.RemainingRecords, + "downloaded", status.ReadCounter(f.Name()), "duration_ms", apiClient.Duration.Milliseconds(), "export_duration_ms", exporter.GetDuration().Milliseconds(), ).Info("export batch complete") diff --git a/pkg/internal/feed/feed_status.go b/pkg/internal/feed/feed_status.go index 0f6a7970..89869995 100644 --- a/pkg/internal/feed/feed_status.go +++ b/pkg/internal/feed/feed_status.go @@ -107,6 +107,15 @@ func (e *ExportStatus) ReadStatus() map[string]*ExportStatusItem { return e.status } +func (e *ExportStatus) ReadCounter(feedName string) int64 { + e.lock.Lock() + defer e.lock.Unlock() + if _, ok := e.status[feedName]; ok { + return e.status[feedName].Counter + } + return 0 +} + func (e *ExportStatus) PurgeFinished() { e.lock.Lock() pendingFeeds := map[string]*ExportStatusItem{} diff --git a/pkg/internal/feed/feed_training_course_progress.go b/pkg/internal/feed/feed_training_course_progress.go index bb461636..93529ee5 100644 --- a/pkg/internal/feed/feed_training_course_progress.go +++ b/pkg/internal/feed/feed_training_course_progress.go @@ -129,7 +129,7 @@ func (f *TrainingCourseProgressFeed) Export(ctx context.Context, apiClient *http status.IncrementStatus(f.Name(), int64(numRows), apiClient.Duration.Milliseconds()) l.With( - "downloaded", numRows, + "downloaded", status.ReadCounter(f.Name()), "duration_ms", apiClient.Duration.Milliseconds(), "export_duration_ms", exporter.GetDuration().Milliseconds(), ).Info("export batch complete")