Document RuntimeState concurrency model and mark task 5 complete
This commit is contained in:
@@ -5,6 +5,12 @@ exposed through a controlled state manager object. This keeps the FastAPI
|
||||
framework state bag limited to shared infrastructure handles and immutable
|
||||
configuration while still allowing existing code to access runtime values via
|
||||
attribute proxying.
|
||||
|
||||
RuntimeState is designed for a single-process, single-worker asyncio
|
||||
deployment. Mutations must complete without awaiting across read-modify-write
|
||||
sequences. If BanGUI is ever deployed with multiple workers or across processes,
|
||||
this module must be replaced with a shared backend such as Redis or shared
|
||||
memory.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -13,9 +19,8 @@ import datetime
|
||||
from dataclasses import dataclass, field
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from starlette.datastructures import State
|
||||
|
||||
import structlog
|
||||
from starlette.datastructures import State
|
||||
|
||||
from app.models.config import PendingRecovery
|
||||
from app.models.server import ServerStatus
|
||||
|
||||
Reference in New Issue
Block a user