Enable writing of PIS Metadata
All checks were successful
Go Test / test (push) Successful in 35s

This commit is contained in:
Fred Boniface 2024-11-22 21:38:53 +00:00
parent 977ff77d50
commit 2ef228a192
4 changed files with 8 additions and 4 deletions

View File

@ -17,7 +17,7 @@ var MongoClient (*mongo.Client)
// Builds the DB URI based on the loaded configuration parameters // Builds the DB URI based on the loaded configuration parameters
func getDbUri(cfg *helpers.Configuration) string { func getDbUri(cfg *helpers.Configuration) string {
var uri = "mongodb://" + cfg.DbUser + ":" + cfg.DbPass + "@" + cfg.DbHost + ":" + cfg.DbPort + "?authSource=owlboard" var uri = "mongodb://" + cfg.DbUser + ":" + cfg.DbPass + "@" + cfg.DbHost + ":" + cfg.DbPort + "/?authSource=owlboard"
return uri return uri
} }

View File

@ -5,7 +5,7 @@ import (
) )
// Version Constants // Version Constants
const versionNum string = "2024.11.5" const versionNum string = "2024.11.6"
const versionSuffix string = "" const versionSuffix string = ""
const Version string = versionNum + versionSuffix const Version string = versionNum + versionSuffix

View File

@ -67,4 +67,9 @@ func Check() {
if err != nil { if err != nil {
log.Error("Error updating PIS Data", zap.Error(err)) log.Error("Error updating PIS Data", zap.Error(err))
} }
err = dbAccess.PutPisMetadata(apiResp.Name)
if err != nil {
log.Error("Error updating PIS Metadata", zap.Error(err))
}
} }

View File

@ -54,8 +54,7 @@ func runUpdate(tarballUrl string) error {
} }
log.Info("Loaded PIS Files to Slice") log.Info("Loaded PIS Files to Slice")
// Temporarily use "pis_testing" collection to ensure all works as expected err = dbAccess.DropCollection(dbAccess.PisCollection)
err = dbAccess.DropCollection("pis_testing")
if err != nil { if err != nil {
return err return err
} }