- Add log for registration TTL
- Bump version
This commit is contained in:
parent
bd69ee0d58
commit
7ca6074752
@ -14,7 +14,7 @@
|
||||
# program. If not, see
|
||||
# https://git.fjla.uk/OwlBoard/db-manager/src/branch/main/LICENSE
|
||||
|
||||
version = "2024.2.1"
|
||||
version = "2024.3.0"
|
||||
print(f"main.py: Initialising db-manager v{version}")
|
||||
|
||||
#Third Party Imports
|
||||
@ -60,6 +60,8 @@ except:
|
||||
mongo.dropCollection("registrations")
|
||||
mongo.createTtlIndex("registrations", "time", 14400)
|
||||
|
||||
log.out(f"Indexes for 'registrations': {list(mongo.listIndexes('registrations'))}")
|
||||
|
||||
# Push version number to database for reporting
|
||||
mongo.putVersion(version)
|
||||
|
||||
|
@ -141,3 +141,7 @@ def deleteMany(collection :str, filter :dict):
|
||||
col = db[collection]
|
||||
incrementCounter(collection)
|
||||
return col.delete_many(filter)
|
||||
|
||||
def listIndexes(collection :str):
|
||||
col = db[collection]
|
||||
return col.list_indexes()
|
Reference in New Issue
Block a user