INNER CODE UNIT · Python

_serve_mtime

yohey-w/multi-agent-shogun · scripts/dashboard-viewer.py:261

    def _serve_mtime(self):
        try:
            mtime = self.dashboard_path.stat().st_mtime
        except FileNotFoundError:
            self.send_error(404, "dashboard.md not found")
            return
        body = json.dumps({"mtime": mtime}).encode("utf-8")
        self.send_response(200)
        self.send_header("Content-Type", "application/json")
        self.send_header("Cache-Control", "no-cache")
        self.send_header("Content-Length", str(len(body)))
        self.end_headers()
        self.wfile.write(body)


def main():
    repo_root = get_repo_root()
    dashboard_path = repo_root / "dashboard.md"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…