README, config file
This commit is contained in:
@@ -10,11 +10,14 @@ from starlette.middleware.cors import CORSMiddleware
|
||||
|
||||
from mcp_logic import MCPServer
|
||||
from tools import TOOL_REGISTRY
|
||||
import config
|
||||
|
||||
|
||||
# --- Configuration & Logging ---
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
filename="debug.log",
|
||||
level=getattr(logging, config.LOG_LEVEL),
|
||||
filename=config.LOG_FILE,
|
||||
|
||||
filemode="a",
|
||||
format="%(asctime)s - %(levelname)s - %(message)s"
|
||||
)
|
||||
@@ -90,11 +93,12 @@ app.add_middleware(
|
||||
if __name__ == "__main__":
|
||||
config = uvicorn.Config(
|
||||
app=app,
|
||||
host="127.0.0.1",
|
||||
port=8000,
|
||||
host=config.HOST,
|
||||
port=config.PORT,
|
||||
log_level="info",
|
||||
timeout_graceful_shutdown=2 # Reduced from 5 to 2 seconds
|
||||
)
|
||||
|
||||
server = uvicorn.Server(config)
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
|
||||
Reference in New Issue
Block a user