8fa36b774e
Key changes: - New: data_loader.py SQLite persistence with drop_sqlite_table - New: db_utils.py retry_on_lock decorator (3 retries, exponential backoff) - New: tool_registry.py with 27 MCP tools (filter_and_cluster, compute_scores, etc.) - New: tls_ref.py for TLS cipher/reference data - New: import_tlsdb.py management command - New: scripts/start_server.py for portable runtime - New: migrations 0003-0007 for SQLite table, display_id, llm fields - Changed: views.py unified pipeline worker, retry_run, display_id everywhere - Changed: models.py with display_id auto-assignment, run_type, sqlite_table, llm_thinking, tool_calls_json - Changed: urls.py added retry_run route - Changed: session_store.py robust JSON persistence - Changed: AGENTS.md v7 fix summary added - Changed: templates — globe rewrite (inertia/polar flip), auto.html (thinking/tool accordions), base.html (toast/config), all pages use display_id - Changed: run.bat PYTHONUTF8=1 - Deleted: entity_detector.py, entity_aggregator.py (replaced by filter_and_cluster clustering pipeline) - Test: 92/92 unit tests passing
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
"""Start the development server with host and port from config.yaml.
|
|
|
|
Reads server.host and server.port from config/config.yaml via the project's
|
|
config loader, runs ``manage.py runserver <host>:<port>``, and opens a browser
|
|
to http://127.0.0.1:<port> .
|
|
|
|
Usage (by run.bat):
|
|
start /B runtime\\python\\python.exe scripts\\start_server.py
|
|
"""
|
|
|
|
import subprocess
|
|
import sys
|
|
import webbrowser
|
|
from pathlib import Path
|
|
|
|
from config import get_config
|
|
|
|
|
|
def main() -> None:
|
|
cfg = get_config()
|
|
|
|
host = cfg.server.host or '0.0.0.0'
|
|
port = cfg.server.port or 80
|
|
|
|
addr = f'{host}:{port}'
|
|
manage_py = Path(__file__).resolve().parent.parent / 'manage.py'
|
|
|
|
# Open browser — use 127.0.0.1 regardless of bind address so the user's
|
|
# browser always reaches the local machine.
|
|
webbrowser.open(f'http://127.0.0.1:{port}/')
|
|
|
|
# Run the server. subprocess.call is blocking, so this script stays alive
|
|
# as long as the dev server does — the same effect as calling manage.py
|
|
# directly under start /B.
|
|
sys.exit(subprocess.call([sys.executable, str(manage_py), 'runserver', addr, '--noreload']))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|