Update PIS to use live db collection
All checks were successful
Go Test / test (push) Successful in 2m8s
All checks were successful
Go Test / test (push) Successful in 2m8s
This commit is contained in:
parent
488551e914
commit
977ff77d50
@ -17,7 +17,7 @@ var MongoClient (*mongo.Client)
|
||||
|
||||
// Builds the DB URI based on the loaded configuration parameters
|
||||
func getDbUri(cfg *helpers.Configuration) string {
|
||||
var uri = "mongodb://" + cfg.DbUser + ":" + cfg.DbPass + "@" + cfg.DbHost + ":" + cfg.DbPort
|
||||
var uri = "mongodb://" + cfg.DbUser + ":" + cfg.DbPass + "@" + cfg.DbHost + ":" + cfg.DbPort + "?authSource=owlboard"
|
||||
return uri
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ func PutPisMetadata(version string) error {
|
||||
|
||||
// Puts complete PIS dataset to database
|
||||
func PutPisData(pis *[]database.PIS) (int64, error) {
|
||||
coll := MongoClient.Database(DatabaseName).Collection("pis_testing")
|
||||
coll := MongoClient.Database(DatabaseName).Collection(PisCollection)
|
||||
|
||||
var docs []interface{}
|
||||
for _, entry := range *pis {
|
||||
@ -69,7 +69,7 @@ func PutPisData(pis *[]database.PIS) (int64, error) {
|
||||
}
|
||||
|
||||
func CreatePisIndeces() error {
|
||||
coll := MongoClient.Database(DatabaseName).Collection("pis_testing")
|
||||
coll := MongoClient.Database(DatabaseName).Collection(PisCollection)
|
||||
|
||||
crsIndex := mongo.IndexModel{
|
||||
Keys: bson.D{{"stops", 1}},
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
// Version Constants
|
||||
const versionNum string = "2024.11.4"
|
||||
const versionNum string = "2024.11.5"
|
||||
const versionSuffix string = ""
|
||||
const Version string = versionNum + versionSuffix
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user