mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-03 22:08:11 -04:00
dns/ddclient: move accounting of "last accessed timestamp' to poller, when execute() fails for whatever reason without an update, we want to prevent it looping to fast.
This commit is contained in:
parent
c5d27b9ab3
commit
6340b8a1e2
2 changed files with 4 additions and 2 deletions
|
|
@ -128,6 +128,5 @@ class BaseAccount:
|
|||
# if current address doesn't equal the current state, propagate the fact
|
||||
return True
|
||||
else:
|
||||
# unmodified, keep track of last access timestamp
|
||||
self._last_accessed = time.time()
|
||||
# unmodified, poller keeps track of last access timestamp
|
||||
return False
|
||||
|
|
|
|||
|
|
@ -151,6 +151,9 @@ class Poller:
|
|||
if self.is_verbose:
|
||||
syslog.syslog(syslog.LOG_NOTICE, "Account %s changed" % acc.description)
|
||||
needs_flush = True
|
||||
else:
|
||||
# update last accessed timestamp
|
||||
acc.update_state(None)
|
||||
except Exception as e:
|
||||
# fatal exception, update atime so we're not going to retry too soon
|
||||
acc.update_state(None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue