Add features:
- Push version number to DB - Bump version to 1.1.0
This commit is contained in:
parent
297c43a40c
commit
0a82f71168
@ -14,7 +14,7 @@
|
||||
# program. If not, see
|
||||
# https://git.fjla.uk/OwlBoard/db-manager/src/branch/main/LICENSE
|
||||
|
||||
version = "1.0.6"
|
||||
version = "1.1.0"
|
||||
print(f"main.py: Initialising db-manager v{version}")
|
||||
|
||||
#Third Party Imports
|
||||
@ -53,5 +53,8 @@ if corpusAge > 1036800:
|
||||
else:
|
||||
log.out('main.py: Not updating stations data', "INFO")
|
||||
|
||||
# Push version number to database for reporting
|
||||
mongo.putVersion(version)
|
||||
|
||||
# END
|
||||
log.out(f"main.py: db-manager v{version} Complete", "INFO")
|
@ -104,3 +104,9 @@ def metaCounters():
|
||||
col.update_one({"target": "counters","type": "count"}, {"$set":{"target": "counters","type": "count","since": int(time.time())}}, upsert=True)
|
||||
incrementCounter(collection)
|
||||
return
|
||||
|
||||
def putVersion(version):
|
||||
collection = "versions"
|
||||
col = db[collection]
|
||||
res = col.update_one({"target": "dbmanager"}, {"$set":{"target": "dbmanager","version": version}}, upsert=True)
|
||||
return
|
Reference in New Issue
Block a user