Adjust PIS update time
This commit is contained in:
parent
08805c9f86
commit
86d439e70a
@ -60,10 +60,10 @@ else:
|
|||||||
log.out('main.py: Not updating stations data until it is 1036800s old.', "INFO")
|
log.out('main.py: Not updating stations data until it is 1036800s old.', "INFO")
|
||||||
|
|
||||||
#Check & Update pis data:
|
#Check & Update pis data:
|
||||||
# If older than 12 days then update
|
# If older than 2 days then update
|
||||||
pisAge = int(time.time()) - mongo.metaCheckTime("pis")
|
pisAge = int(time.time()) - mongo.metaCheckTime("pis")
|
||||||
log.out(f'main.py: PIS Data is {pisAge}s old', "INFO")
|
log.out(f'main.py: PIS Data is {pisAge}s old', "INFO")
|
||||||
if pisAge > 900: # Temporarily set to 15 minutes
|
if pisAge > 172800: # Temporarily set to 15 minutes
|
||||||
log.out('main.py: Updating PIS data', "INFO")
|
log.out('main.py: Updating PIS data', "INFO")
|
||||||
pisData = pis.load()
|
pisData = pis.load()
|
||||||
pisParsed = pis.parse(pisData)
|
pisParsed = pis.parse(pisData)
|
||||||
|
Reference in New Issue
Block a user