(self, to, address, check_files=False, since=None, announce=False)
| 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 |
nothing calls this directly
no test coverage detected