Fix error adjusting TTL intex

This commit is contained in:
Fred Boniface 2024-02-19 11:57:31 +00:00
parent e6e7f00f4c
commit bd69ee0d58

View File

@ -53,6 +53,11 @@ timetable.runUpdate()
## Create general indexes ## Create general indexes
log.out('main.py: Requesting TTL Index Creation', "INFO") log.out('main.py: Requesting TTL Index Creation', "INFO")
mongo.createTtlIndex("users", "atime", 2629800) mongo.createTtlIndex("users", "atime", 2629800)
try:
mongo.createTtlIndex("registrations", "time", 14400)
except:
mongo.dropCollection("registrations")
mongo.createTtlIndex("registrations", "time", 14400) mongo.createTtlIndex("registrations", "time", 14400)
# Push version number to database for reporting # Push version number to database for reporting