Add comments
This commit is contained in:
@@ -60,9 +60,10 @@ func SetUpdateTime(collectionName string) error {
|
||||
}
|
||||
update := bson.M{
|
||||
"$set": bson.M{
|
||||
"updated": updateTime,
|
||||
"target": collectionName,
|
||||
"type": "collection",
|
||||
"updated": updateTime,
|
||||
"updated_time": time.Now().In(time.UTC),
|
||||
"target": collectionName,
|
||||
"type": "collection",
|
||||
},
|
||||
}
|
||||
_, err := collection.UpdateOne(context.Background(), filter, update, options)
|
||||
@@ -78,13 +79,13 @@ func SetUpdateTime(collectionName string) error {
|
||||
// Currently uses the old name of mq-client
|
||||
func PushVersionToDb() {
|
||||
version := database.Version{
|
||||
Target: "mq-client",
|
||||
Component: "mq-client",
|
||||
Target: "timetable-mgr",
|
||||
Component: "timetable-mgr",
|
||||
Version: helpers.Version,
|
||||
}
|
||||
versionSelector := database.VersionSelector{
|
||||
Target: "mq-client",
|
||||
Component: "mq-client",
|
||||
Target: "timetable-mgr",
|
||||
Component: "timetable-mgr",
|
||||
}
|
||||
opts := options.Update().SetUpsert(true)
|
||||
coll := MongoClient.Database("owlboard").Collection("versions")
|
||||
|
||||
Reference in New Issue
Block a user