mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-12 11:05:42 +00:00
Scrub watch snapshot fixes
This commit is contained in:
@@ -301,10 +301,10 @@ class ChangeDetectionStore:
|
|||||||
del_timestamps.append(timestamp)
|
del_timestamps.append(timestamp)
|
||||||
changes_removed += 1
|
changes_removed += 1
|
||||||
|
|
||||||
if not limit_timestamp:
|
if not limit_timestamp:
|
||||||
self.data['watching'][uuid]['last_checked'] = 0
|
self.data['watching'][uuid]['last_checked'] = 0
|
||||||
self.data['watching'][uuid]['last_changed'] = 0
|
self.data['watching'][uuid]['last_changed'] = 0
|
||||||
self.data['watching'][uuid]['previous_md5'] = 0
|
self.data['watching'][uuid]['previous_md5'] = ""
|
||||||
|
|
||||||
|
|
||||||
for timestamp in del_timestamps:
|
for timestamp in del_timestamps:
|
||||||
@@ -323,7 +323,7 @@ class ChangeDetectionStore:
|
|||||||
content = fp.read()
|
content = fp.read()
|
||||||
self.data['watching'][uuid]['previous_md5'] = hashlib.md5(content).hexdigest()
|
self.data['watching'][uuid]['previous_md5'] = hashlib.md5(content).hexdigest()
|
||||||
except (FileNotFoundError, IOError):
|
except (FileNotFoundError, IOError):
|
||||||
self.data['watching'][uuid]['previous_md5'] = False
|
self.data['watching'][uuid]['previous_md5'] = ""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.needs_write = True
|
self.needs_write = True
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class update_worker(threading.Thread):
|
|||||||
self.datastore.update_watch(uuid=uuid, update_obj={'last_error': err_text,
|
self.datastore.update_watch(uuid=uuid, update_obj={'last_error': err_text,
|
||||||
'last_check_status': e.status_code})
|
'last_check_status': e.status_code})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.app.logger.error("Exception reached processing watch UUID:%s - %s", uuid, str(e))
|
self.app.logger.error("Exception reached processing watch UUID: %s - %s", uuid, str(e))
|
||||||
self.datastore.update_watch(uuid=uuid, update_obj={'last_error': str(e)})
|
self.datastore.update_watch(uuid=uuid, update_obj={'last_error': str(e)})
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user