MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / cbServerUpdate

Method cbServerUpdate

src/Ui/UiWebsocket.py:1107–1122  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

1105 @flag.no_multiuser
1106 def actionServerUpdate(self, to):
1107 def cbServerUpdate(res):
1108 self.response(to, res)
1109 if not res:
1110 return False
1111 for websocket in self.server.websockets:
1112 websocket.cmd(
1113 "notification",
1114 ["info", _["Updating ZeroNet client, will be back in a few minutes..."], 20000]
1115 )
1116 websocket.cmd("updating")
1117
1118 import main
1119 main.update_after_shutdown = True
1120 SiteManager.site_manager.save()
1121 main.file_server.stop()
1122 main.ui_server.stop()
1123
1124 self.cmd(
1125 "confirm",

Callers

nothing calls this directly

Calls 4

responseMethod · 0.95
cmdMethod · 0.45
saveMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected