From 3481c4e314b3d881b75d815ad43096f2a5c705fe Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sat, 6 Apr 2024 22:31:38 +0100 Subject: [PATCH] Tidy up --- cif/process.go | 3 ++- cif/update.go | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cif/process.go b/cif/process.go index a2b6548..73d39d1 100644 --- a/cif/process.go +++ b/cif/process.go @@ -71,7 +71,8 @@ func doCreations(creations []*upstreamApi.JsonScheduleV1) error { createDocuments := make([]database.Service, 0) for _, item := range creations { document := database.Service{} - // Do type conversion here + // Do type conversion here - REMOVE THIS LOG LINE, IT WILL CAUSE 10000s of log entries + log.Msg.Debug("item", zap.Any("item", item)) createDocuments = append(createDocuments, document) } diff --git a/cif/update.go b/cif/update.go index fcdb95a..65eb196 100644 --- a/cif/update.go +++ b/cif/update.go @@ -60,7 +60,7 @@ func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMeta return err } // Parse CIF file - parsed, err = parseCifData(data) + parsed, err := parseCifData(data) if err != nil { log.Msg.Error("Error parsing CIF data", zap.Error(err)) return err @@ -70,7 +70,8 @@ func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMeta //// I need to check what the sequence looks like in a full download first. //// Regarding metadata, I will need to replace 'metadata *dbAccess.CifMetadata' with the new metadata to ensure it is checked correctly in each iteration. // Process CIF file - // Update metadata variable + + metadata = generateMetadata(&parsed.header) } // Write metadata