From 711853a1499a8c8a2d7bbdda59f1402ae2212fad Mon Sep 17 00:00:00 2001 From: Leigh Morresi <275001+dgtlmoon@users.noreply.github.com> Date: Tue, 2 Feb 2021 22:51:18 +0100 Subject: [PATCH] Sometimes it seems .update wasnt thread safe and isnt used here, just add a clean new dict member --- backend/store.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/store.py b/backend/store.py index 16ed08f2..d956410e 100644 --- a/backend/store.py +++ b/backend/store.py @@ -130,8 +130,9 @@ class ChangeDetectionStore: def add_watch(self, url, tag): - # @todo deal with exception - validators.url(url) + print("Adding", url, tag) + # # @todo deal with exception + # validators.url(url) # @todo use a common generic version of this new_uuid = str(uuid_builder.uuid4()) @@ -142,7 +143,7 @@ class ChangeDetectionStore: 'uuid': new_uuid }) - self.data['watching'].update({_blank['uuid']: _blank}) + self.data['watching'][new_uuid] = _blank return new_uuid