Skip to content

Commit

Permalink
Dump StateAt field too
Browse files Browse the repository at this point in the history
  • Loading branch information
lustefaniak committed Jun 12, 2024
1 parent aa6472a commit dceaa51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions synq/synq.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"google.golang.org/grpc/credentials"
"net/url"
"os"
"time"
)

type IngestMetadataRequestDump struct {
Expand All @@ -25,6 +26,7 @@ type IngestMetadataRequestDump struct {
FileContent map[string]json.RawMessage `json:"file_content"`
UploaderVersion string `json:"uploader_version"`
UploaderBuildTime string `json:"uploader_build_time"`
StateAt time.Time `json:"state_at"`
}

func DumpMetadata(output *ingestsqlmeshv1.IngestMetadataRequest, filename string) error {
Expand All @@ -38,6 +40,7 @@ func DumpMetadata(output *ingestsqlmeshv1.IngestMetadataRequest, filename string
FileContent: lo.MapValues(output.FileContent, func(v []byte, k string) json.RawMessage { return v }),
UploaderVersion: output.UploaderVersion,
UploaderBuildTime: output.UploaderBuildTime,
StateAt: output.StateAt.AsTime(),
}

asJson, err := json.MarshalIndent(outputRaw, "", " ")
Expand Down

0 comments on commit dceaa51

Please sign in to comment.