Update PIS Codes

This commit is contained in:
Fred Boniface 2023-04-26 10:56:02 +01:00
parent 6c0b016a9a
commit 45baf8a1c3
2 changed files with 15 additions and 1 deletions

View File

@ -1,6 +1,12 @@
pis:
- code: 5001
stops: [avn,shh,sml,cfn,rda,mtp,srd,lwh,bri]
- code: 5017
stops: [bri,bmt,psn,nls,yat,wor,wnm,wsm]
- code: 5032
stops: [cdf,nwp,stj,pwy,fit,srd,lwh,bri]
- code: 5038
stops: [cdf,nwp,stj,pwy,fit,bri,bmt,psn,nls,yat,wor,wnm,wsm,hig,bwt,tau]
- code: 5047
stops: [svb,sar,avn,shh,sml,cfn,rda,mtp,srd,lwh,bri]
- code: 5053
@ -9,6 +15,12 @@ pis:
stops: [bri,lwh,srd,fit,bpw]
- code: 5060
stops: [bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb]
- code: 5092
stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri]
- code: 5215
stops: [bri,kyn,olf,bth,ffd,avn,boa,tro,wsb,fro,bru,clc,yvp,tho,yet,cno,mdn,dcw,upw,wey]
- code: 5248
stops: [wey,upw,dcw,mdn,cno,yet,tho,yvp,clc,bru,fro,wsb,tro,boa,avn,ffd,bth,olf,kyn,bri]
- code: 5487
stops: [wsm,wnm,wor,yat,nls,psn,bmt,bri,lwh,srd,mtp,rda,cfn,sml,shh,avn,sar,svb]
- code: 5502
@ -17,6 +29,8 @@ pis:
stops: [cfn,rda,mtp,srd,lwh,bri]
- code: 5523
stops: [fit,srd,lwh,bri]
- code: 5866
stops: [sal,wmn,dmh,wsb,tro,boa,avf,ffd,bth,olf,kyn,bri]
- code: 6067
stops: [avn,pri,shh,sml,cfn,rda,mtp,srd,lwh,bri,bmt,psn,nls,yat,wor,wnm,wsm]
- code: 6070

View File

@ -57,7 +57,7 @@ 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 > 1036800:
if pisAge > 43200: # Temporarily set to one day
log.out('main.py: Updating PIS data', "INFO")
pisData = pis.load()
mongo.putBulkPis(pisData)