Use brotli for reducing the size of the text snapshots (#1482)

This commit is contained in:
dgtlmoon
2023-03-19 21:12:22 +01:00
committed by GitHub
parent e6d2d87b31
commit 3b80bb2f0e
8 changed files with 114 additions and 77 deletions

View File

@@ -179,9 +179,7 @@ class WatchSingleHistory(Resource):
if timestamp == 'latest':
timestamp = list(watch.history.keys())[-1]
# @todo - Check for UTF-8 compatability
with open(watch.history[timestamp], 'r') as f:
content = f.read()
content = watch.get_history_snapshot(timestamp)
response = make_response(content, 200)
response.mimetype = "text/plain"