ci: update docs validation paths and cleanup test files
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Documentation Validation / validate-docs (push) Failing after 9s
Documentation Validation / validate-policies-strict (push) Successful in 3s
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Documentation Validation / validate-docs (push) Failing after 9s
Documentation Validation / validate-policies-strict (push) Successful in 3s
- Rename docs/11_agents to docs/agents in workflow paths - Add DATA_DIR environment variable support to agent-registry (defaults to /var/lib/aitbc) - Remove obsolete test files (test_host_miner.py, test_transactions_display.py)
This commit is contained in:
@@ -10,11 +10,16 @@ from typing import List, Optional, Dict, Any
|
||||
import json
|
||||
import time
|
||||
import uuid
|
||||
import os
|
||||
from datetime import datetime, UTC, timedelta
|
||||
import sqlite3
|
||||
from contextlib import contextmanager
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
# Database path - use DATA_DIR environment variable or fallback to /var/lib/aitbc
|
||||
DATA_DIR = os.environ.get('DATA_DIR', '/var/lib/aitbc')
|
||||
DB_PATH = os.path.join(DATA_DIR, 'agent_registry.db')
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
# Startup
|
||||
@@ -27,7 +32,7 @@ app = FastAPI(title="AITBC Agent Registry API", version="1.0.0", lifespan=lifesp
|
||||
|
||||
# Database setup
|
||||
def get_db():
|
||||
conn = sqlite3.connect('agent_registry.db')
|
||||
conn = sqlite3.connect(DB_PATH)
|
||||
conn.row_factory = sqlite3.Row
|
||||
return conn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user