|
|
|
@ -242,6 +242,14 @@ class ChangeDetectionStore:
|
|
|
|
|
def clear_watch_history(self, uuid):
|
|
|
|
|
import pathlib
|
|
|
|
|
|
|
|
|
|
# JSON Data, Screenshots, Textfiles (history index and snapshots), HTML in the future etc
|
|
|
|
|
for item in pathlib.Path(os.path.join(self.datastore_path, uuid)).rglob("*.*"):
|
|
|
|
|
unlink(item)
|
|
|
|
|
|
|
|
|
|
# Force the attr to recalculate
|
|
|
|
|
bump = self.__data['watching'][uuid].history
|
|
|
|
|
|
|
|
|
|
# Do this last because it will trigger a recheck due to last_checked being zero
|
|
|
|
|
self.__data['watching'][uuid].update({
|
|
|
|
|
'browser_steps_last_error_step' : None,
|
|
|
|
|
'check_count': 0,
|
|
|
|
@ -258,13 +266,6 @@ class ChangeDetectionStore:
|
|
|
|
|
'track_ldjson_price_data': None,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
# JSON Data, Screenshots, Textfiles (history index and snapshots), HTML in the future etc
|
|
|
|
|
for item in pathlib.Path(os.path.join(self.datastore_path, uuid)).rglob("*.*"):
|
|
|
|
|
unlink(item)
|
|
|
|
|
|
|
|
|
|
# Force the attr to recalculate
|
|
|
|
|
bump = self.__data['watching'][uuid].history
|
|
|
|
|
|
|
|
|
|
self.needs_write_urgent = True
|
|
|
|
|
|
|
|
|
|
def add_watch(self, url, tag='', extras=None, tag_uuids=None, write_to_disk_now=True):
|
|
|
|
|