kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Just use the current/previous md5
rodzic
1718e2e86f
commit
b0c5dbd88e
|
@ -450,8 +450,7 @@ class Worker(threading.Thread):
|
|||
app.logger.error("File permission error updating", uuid, str(s))
|
||||
else:
|
||||
if result:
|
||||
|
||||
result["previous_md5"] = result["current_md5"]
|
||||
|
||||
datastore.update_watch(uuid=uuid, update_obj=result)
|
||||
|
||||
if contents:
|
||||
|
|
|
@ -89,6 +89,6 @@ class perform_site_check():
|
|||
update_obj["last_changed"] = timestamp
|
||||
|
||||
|
||||
update_obj["current_md5"] = fetched_md5
|
||||
update_obj["previous_md5"] = fetched_md5
|
||||
|
||||
return update_obj, stripped_text_from_html
|
||||
|
|
|
@ -198,7 +198,7 @@ class ChangeDetectionStore:
|
|||
def save_history_text(self, uuid, result_obj, contents):
|
||||
|
||||
output_path = "{}/{}".format(self.datastore_path, uuid)
|
||||
fname = "{}/{}-{}.stripped.txt".format(output_path, result_obj['current_md5'], str(time.time()))
|
||||
fname = "{}/{}-{}.stripped.txt".format(output_path, result_obj['previous_md5'], str(time.time()))
|
||||
with open(fname, 'w') as f:
|
||||
f.write(contents)
|
||||
f.close()
|
||||
|
|
Ładowanie…
Reference in New Issue