2 Commits

Author SHA1 Message Date
feb966cba4 bugfix 2026-05-21 18:38:34 +08:00
3de5a1ce91 feat: multi-process architecture with independent backend processes
- Extract backend_accounting from llmage cleanupctx to independent process
- Add bin/backend_accounting.py for standalone LLM billing loop
- Rewrite start.sh with two-phase startup:
  1. Independent backend programs (run once)
  2. Sage Web workers (SO_REUSEPORT on same port)
- Rewrite stop.sh to handle both workers and backend processes
- Add .gitignore for build artifacts and runtime files

Architecture:
- CPU core detection for worker count
- All workers share port 9180 via SO_REUSEPORT
- Backend processes tracked in sage_backend.pid
- Workers tracked in sage.pid
2026-05-17 00:11:53 +08:00