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

Method cbProgress

src/Ui/UiWebsocket.py:500–506  ·  view source on GitHub ↗
(published, limit)

Source from the content-addressed store, hash-verified

498
499 def doSitePublish(self, site, inner_path):
500 def cbProgress(published, limit):
501 progress = int(float(published) / limit * 100)
502 self.cmd("progress", [
503 "publish",
504 _["Content published to {0}/{1} peers."].format(published, limit),
505 progress
506 ])
507 diffs = site.content_manager.getDiffs(inner_path)
508 back = site.publish(limit=5, inner_path=inner_path, diffs=diffs, cb_progress=cbProgress)
509 if back == 0: # Failed to publish to anyone

Callers

nothing calls this directly

Calls 2

cmdMethod · 0.95
formatMethod · 0.80

Tested by

no test coverage detected