Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Successful in 17s
Documentation Validation / validate-docs (push) Failing after 9s
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Successful in 2m38s
Python Tests / test-python (push) Failing after 9s
Security Scanning / security-scan (push) Successful in 26s
Systemd Sync / sync-systemd (push) Successful in 19s
- Export service layer classes in aitbc/__init__.py lazy exports - Add BlockchainService, RPCBlockchainService, BlockchainServiceFactory - Add DatabaseService, SQLiteDatabaseService, DatabaseServiceFactory - Remove obsolete AITBCHTTPClient export - Fix import path in multichain_exchange_api.py (http_client -> network.http_client) - Fix import path in agent-coordinator-wrapper.py (paths -> utils.paths) - Update Learning Service port from 8011 to
40 lines
999 B
Python
Executable File
40 lines
999 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Wrapper script for aitbc-agent-coordinator service
|
|
Uses centralized aitbc utilities for path configuration
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
from pathlib import Path
|
|
|
|
# Add aitbc to path
|
|
sys.path.insert(0, str(Path("/opt/aitbc")))
|
|
|
|
from aitbc.constants import DATA_DIR, ENV_FILE, LOG_DIR, NODE_ENV_FILE, REPO_DIR
|
|
|
|
# Set up environment using aitbc constants
|
|
os.environ["AITBC_ENV_FILE"] = str(ENV_FILE)
|
|
os.environ["AITBC_NODE_ENV_FILE"] = str(NODE_ENV_FILE)
|
|
os.environ["PYTHONPATH"] = f"{REPO_DIR}:{REPO_DIR}/apps/agent-coordinator/src"
|
|
os.environ["DATA_DIR"] = str(DATA_DIR)
|
|
os.environ["LOG_DIR"] = str(LOG_DIR)
|
|
|
|
# Create required directories
|
|
from aitbc.utils.paths import ensure_dir
|
|
ensure_dir(DATA_DIR / "agent-coordinator")
|
|
ensure_dir(LOG_DIR / "agent-coordinator")
|
|
|
|
# Execute the actual service
|
|
exec_cmd = [
|
|
"/opt/aitbc/venv/bin/python",
|
|
"-m",
|
|
"uvicorn",
|
|
"app.main:app",
|
|
"--host",
|
|
"0.0.0.0",
|
|
"--port",
|
|
"9001"
|
|
]
|
|
os.execvp(exec_cmd[0], exec_cmd)
|