From c0cadb818a32cad0e5a257297c86b965b2b383dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Thu, 6 Jun 2024 15:49:35 +0200 Subject: [PATCH] fix: Add missing code after rebase --- internal/pkg/service/stream/api/mapper/sink.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/pkg/service/stream/api/mapper/sink.go b/internal/pkg/service/stream/api/mapper/sink.go index c0278ce829..72b6af190b 100644 --- a/internal/pkg/service/stream/api/mapper/sink.go +++ b/internal/pkg/service/stream/api/mapper/sink.go @@ -20,13 +20,21 @@ func (m *Mapper) NewSinkStatisticsTotalResponse(result statistics.Aggregated) *s } func (m *Mapper) NewSinkFile(file model.File) *stream.SinkFile { - return &stream.SinkFile{ + sinkFile := &stream.SinkFile{ State: file.State, OpenedAt: file.OpenedAt().String(), ClosingAt: timeToString(file.ClosingAt), ImportingAt: timeToString(file.ImportingAt), ImportedAt: timeToString(file.ImportedAt), } + + if file.RetryAttempt > 0 { + sinkFile.RetryAttempt = ptr.Ptr(file.RetryAttempt) + sinkFile.RetryReason = ptr.Ptr(file.RetryReason) + sinkFile.RetryAfter = ptr.Ptr(file.RetryAfter.String()) + } + + return sinkFile } func (m *Mapper) NewSinkFileStatistics(result *statistics.Aggregated) *stream.SinkFileStatistics {