Re #22 - ability to pause

This commit is contained in:
dgtlmoon
2021-03-29 16:11:22 +02:00
parent 0a1a8340c2
commit 35e597a4c8
5 changed files with 114 additions and 7 deletions

View File

@@ -47,6 +47,7 @@ class ChangeDetectionStore:
'tag': None,
'last_checked': 0,
'last_changed': 0,
'paused': False,
'last_viewed': 0, # history key value of the last viewed via the [diff] link
'newest_history_key': "",
'title': None,
@@ -134,6 +135,10 @@ class ChangeDetectionStore:
def update_watch(self, uuid, update_obj):
# Skip if 'paused' state
if self.__data['watching'][uuid]['paused']:
return
with self.lock:
# In python 3.9 we have the |= dict operator, but that still will lose data on nested structures...