Fix error adjusting TTL intex
This commit is contained in:
parent
e6e7f00f4c
commit
bd69ee0d58
@ -53,7 +53,12 @@ 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)
|
||||||
mongo.createTtlIndex("registrations", "time", 14400)
|
|
||||||
|
try:
|
||||||
|
mongo.createTtlIndex("registrations", "time", 14400)
|
||||||
|
except:
|
||||||
|
mongo.dropCollection("registrations")
|
||||||
|
mongo.createTtlIndex("registrations", "time", 14400)
|
||||||
|
|
||||||
# Push version number to database for reporting
|
# Push version number to database for reporting
|
||||||
mongo.putVersion(version)
|
mongo.putVersion(version)
|
||||||
|
Reference in New Issue
Block a user