From 9ef9429511f92af4b796fd2def95be46700df7df Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 16 Apr 2024 09:19:12 +0100 Subject: [PATCH] Add duration log to CIF Update --- cif/update.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cif/update.go b/cif/update.go index 353e637..33e801f 100644 --- a/cif/update.go +++ b/cif/update.go @@ -69,6 +69,7 @@ func runCifFullDownload(cfg *helpers.Configuration) error { // Runs a CIF Update for up to five days func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMetadata, days []time.Time) error { + startTime := time.Now() log.Info("Downloading CIF Updates") // Loop over dates @@ -115,6 +116,9 @@ func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMeta log.Warn("CIF Data updated, but metadata write failed.") } + endTime := time.Now() + duration := startTime.Sub(endTime) + log.Info("CIF Update process ended", zap.Duration("duration", duration)) return nil }