weatherApp: error handling
This commit is contained in:
@ -15,3 +15,7 @@ dbLoadRecords("db/weather.db","P=CF:Ext{UNNT},LOC=UNNT")
|
||||
iocInit()
|
||||
|
||||
dbl > weather.dbl
|
||||
system "cp weather.dbl /cf-update/${HOSTNAME}.${IOCNAME}.dbl"
|
||||
|
||||
# Start Reference tracker
|
||||
py "from devsup import disect; disect.periodic(10)"
|
||||
|
@ -129,7 +129,7 @@ class ReportScanner(StoppableThread):
|
||||
|
||||
rtime = iso2sec(report.getISOTime())
|
||||
report._updatetime = rtime
|
||||
print('update',report.getISOTime(),rtime,self.lastUpdate)
|
||||
#print('update',report.getISOTime(),rtime,self.lastUpdate)
|
||||
|
||||
if self.lastUpdate is not None:
|
||||
if self.lastUpdate >= rtime:
|
||||
@ -147,7 +147,7 @@ class ReportScanner(StoppableThread):
|
||||
|
||||
self.lastUpdate = rtime
|
||||
|
||||
except (socket.error, urllib2.URLError) as e:
|
||||
except Exception as e:
|
||||
print("download error for",self.station,":",e)
|
||||
self.updatePeriod = self.initPeriod
|
||||
|
||||
|
Reference in New Issue
Block a user