From 7cb6db4211925a43e565b564b938bb2fce97e25d Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Sun, 16 Oct 2016 12:12:23 -0700 Subject: [PATCH] Check for sane value of archive_delay. Remove it from weewx.conf --- bin/weewx/engine.py | 3 +++ weewx.conf | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/weewx/engine.py b/bin/weewx/engine.py index 73a7513d..1b9fb9cf 100644 --- a/bin/weewx/engine.py +++ b/bin/weewx/engine.py @@ -476,6 +476,9 @@ class StdArchive(StdService): if self.archive_delay <= 0: raise weewx.ViolatedPrecondition("Archive delay (%.1f) must be greater than zero." % (self.archive_delay,)) + if self.archive_delay >= self.archive_interval / 2: + syslog.syslog(syslog.LOG_WARNING, "engine: Archive delay (%d) is unusually long" % + (self.archive_delay,)) syslog.syslog(syslog.LOG_DEBUG, "engine: Use LOOP data in hi/low calculations: %d" % (self.loop_hilo,)) diff --git a/weewx.conf b/weewx.conf index 071c5086..616016b9 100644 --- a/weewx.conf +++ b/weewx.conf @@ -281,10 +281,6 @@ version = 3.6.1 # will be downloaded from the station. Otherwise, specify it (in seconds). archive_interval = 300 - # How long to wait (in seconds) before processing new archive data. Must - # be greater than zero. - archive_delay = 15 - # If possible, new archive records are downloaded from the station # hardware. If the hardware does not support this, then new archive # records will be generated in software.