From 3b514d5a745d83fbdb28153437b149d7a3d9c968 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 4 Jun 2024 12:21:28 +0200 Subject: [PATCH] Document technical debt --- changedetectionio/model/Watch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changedetectionio/model/Watch.py b/changedetectionio/model/Watch.py index e262ac4e..7d7e935b 100644 --- a/changedetectionio/model/Watch.py +++ b/changedetectionio/model/Watch.py @@ -330,6 +330,10 @@ class model(dict): self.ensure_data_dir_exists() + # Because our history.txt is very primitive, we cant have repeating timestamps, so add a delay here. + # @todo something smarter + time.sleep(1) + # Small hack so that we sleep just enough to allow 1 second between history snapshots # this is because history.txt indexes/keys snapshots by epoch seconds and we dont want dupe keys if self.__newest_history_key and int(timestamp) == int(self.__newest_history_key):