Add duration log to CIF Update
All checks were successful
Go Test / test (push) Successful in 39s

This commit is contained in:
Fred Boniface 2024-04-16 09:19:12 +01:00
parent 790d293bc4
commit 9ef9429511

View File

@ -69,6 +69,7 @@ func runCifFullDownload(cfg *helpers.Configuration) error {
// Runs a CIF Update for up to five days // Runs a CIF Update for up to five days
func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMetadata, days []time.Time) error { func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMetadata, days []time.Time) error {
startTime := time.Now()
log.Info("Downloading CIF Updates") log.Info("Downloading CIF Updates")
// Loop over dates // Loop over dates
@ -115,6 +116,9 @@ func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMeta
log.Warn("CIF Data updated, but metadata write failed.") 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 return nil
} }