pis-entry #1
@ -57,13 +57,13 @@ else:
|
||||
# If older than 12 days then update
|
||||
pisAge = int(time.time()) - mongo.metaCheckTime("pis")
|
||||
log.out(f'main.py: PIS Data is {pisAge}s old', "INFO")
|
||||
if pisAge > 3600: # Temporarily set to four hours
|
||||
if pisAge > 900: # Temporarily set to 15 minutes
|
||||
log.out('main.py: Updating PIS data', "INFO")
|
||||
pisData = pis.load()
|
||||
pisParsed = pis.parse(pisData)
|
||||
mongo.putBulkPis(pisParsed)
|
||||
else:
|
||||
log.out('main.py: Not updating PIS data until is it 1036800a old', "INFO")
|
||||
log.out('main.py: Not updating PIS data until is it 1036800s old', "INFO")
|
||||
|
||||
log.out('main.py: Requesting TTL Index Creation', "INFO")
|
||||
mongo.createTtlIndex("users", "atime", 2629800)
|
||||
|
Reference in New Issue
Block a user