Fix server threading, tag URLs, and tag date resolution
- Switch to ThreadingHTTPServer to handle concurrent requests - Catch BrokenPipeError on response writes to suppress noisy tracebacks - Change tag URL from /tags/ to /releases/tag/ - Resolve tag dates via commit SHA from tags API + commits endpoint (works for public repos without auth) - Update tests to match new tag date resolution approach
This commit is contained in:
+2
-2
@@ -307,11 +307,11 @@ def cmd_serve(args: argparse.Namespace, db_path: str) -> None:
|
||||
port = args.port or DEFAULT_SERVER_PORT
|
||||
|
||||
from src.server import create_handler
|
||||
from http.server import HTTPServer
|
||||
from http.server import ThreadingHTTPServer
|
||||
|
||||
handler = create_handler(db_path)
|
||||
try:
|
||||
server = HTTPServer((host, port), handler)
|
||||
server = ThreadingHTTPServer((host, port), handler)
|
||||
except OSError as e:
|
||||
if e.errno == 98: # Address already in use
|
||||
error(f"Port {port} is already in use")
|
||||
|
||||
Reference in New Issue
Block a user