forked from Keelrleek/Harbor
Logbook lives in Harbor and keeps itself current
The board's Logbook view replaces the published page: statistics, the chart of the executable, where the code stands (with the function tiers), the trend, milestones and the ship's log, stored as JSON in the Harbor home. A server thread follows main: each new commit becomes a log entry and the statistics, chart and trend point are rebuilt with the open-seas progress tools on a scratch copy. 'harbor logbook add|stats|map|milestone|refresh'.
This commit is contained in:
1 parent
87631bec52
commit
b7e09cfbd1
7 files changed
+497
-6
No files matched your search
@@ -330,6 +330,9 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
"stopped": any(h.stopped(a) for a in h.project.ai_names)})
|
||||
return self._reply(200, out)
|
||||
h, lock = REGISTRY.get(name)
|
||||
if path == "/api/logbook":
|
||||
from . import logbook
|
||||
return self._reply(200, logbook.read_all(h.project, log_limit=min(int(query.get("limit", 80)), 500)))
|
||||
if path.startswith("/api/decomp/"):
|
||||
# its own connection and lock: these answers take seconds and must not hold up the chat
|
||||
from . import decomp_api
|
||||
@@ -548,6 +551,8 @@ def main(argv=None):
|
||||
threading.Thread(target=backup_loop, daemon=True).start()
|
||||
threading.Thread(target=git_loop, daemon=True).start()
|
||||
threading.Thread(target=toast_loop, daemon=True).start()
|
||||
from . import logbook_auto
|
||||
threading.Thread(target=logbook_auto.loop, args=(REGISTRY,), daemon=True).start()
|
||||
print(f"Harbor on http://127.0.0.1:{PORT} - projects: {', '.join(REGISTRY.names())}", flush=True)
|
||||
server.serve_forever()
|
||||
|
||||
|
||||
Reference in new issue
Block a user