Skip to content

Commit

Permalink
fix: Add missing code after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jachym-tousek-keboola committed Jun 6, 2024
1 parent db94dd6 commit c0cadb8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/pkg/service/stream/api/mapper/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c0cadb8

Please sign in to comment.