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

Method announceSite

src/File/FileServer.py:308–314  ·  view source on GitHub ↗
(self, site)

Source from the content-addressed store, hash-verified

306 time.sleep(60 * 20)
307
308 def announceSite(self, site):
309 site.announce(mode="update", pex=False)
310 active_site = time.time() - site.settings.get("modified", 0) < 24 * 60 * 60
311 if site.settings["own"] or active_site: # Check connections more frequently on own and active sites to speed-up first connections
312 site.needConnections(check_site_on_reconnect=True)
313 site.sendMyHashfield(3)
314 site.updateHashfield(3)
315
316 # Announce sites every 20 min
317 def announceSites(self):

Callers

nothing calls this directly

Calls 5

needConnectionsMethod · 0.80
announceMethod · 0.45
getMethod · 0.45
sendMyHashfieldMethod · 0.45
updateHashfieldMethod · 0.45

Tested by

no test coverage detected