(published, limit)
| 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 |