MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / actionSiteUpdate

Method actionSiteUpdate

src/Ui/UiWebsocket.py:898–911  ·  view source on GitHub ↗
(self, to, address, check_files=False, since=None, announce=False)

Source from the content-addressed store, hash-verified

896
897 # Update site content.json
898 def actionSiteUpdate(self, to, address, check_files=False, since=None, announce=False):
899 def updateThread():
900 site.update(announce=announce, check_files=check_files, since=since)
901 self.response(to, "Updated")
902
903 site = self.server.sites.get(address)
904 if site and (site.address == self.site.address or "ADMIN" in self.site.settings["permissions"]):
905 if not site.settings["serving"]:
906 site.settings["serving"] = True
907 site.saveSettings()
908
909 gevent.spawn(updateThread)
910 else:
911 self.response(to, {"error": "Unknown site: %s" % address})
912
913 # Pause site serving
914 @flag.admin

Callers

nothing calls this directly

Calls 3

responseMethod · 0.95
saveSettingsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected