Don't push body of content.json with updates if larger than 10kb

This commit is contained in:
shortcutme 2019-05-30 04:26:41 +02:00
parent e5d3b0e7b8
commit 4222c31b3e
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
4 changed files with 103 additions and 29 deletions

View file

@ -527,12 +527,7 @@ class Site(object):
for retry in range(2):
try:
with gevent.Timeout(timeout, False):
result = peer.request("update", {
"site": self.address,
"inner_path": inner_path,
"body": body,
"diffs": diffs
})
result = peer.publish(self.address, inner_path, body, content_json_modified, diffs)
if result:
break
except Exception as err: