pis-entry #1

Merged
fred.boniface merged 23 commits from pis-entry into dev 2023-05-06 21:51:54 +01:00
Showing only changes of commit ad4961bbe0 - Show all commits

View File

@ -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)