docs: update CLI command syntax across workflow documentation
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
- Updated marketplace commands: `marketplace --action` → `market` subcommands - Updated wallet commands: direct flags → `wallet` subcommands - Updated AI commands: `ai-submit`, `ai-status` → `ai submit`, `ai status` - Updated blockchain commands: `chain` → `blockchain info` - Standardized command structure across all workflow files - Affected files: MULTI_NODE_MASTER_INDEX.md, TEST_MASTER_INDEX.md, multi-node-blockchain-marketplace
This commit is contained in:
@@ -5,13 +5,28 @@ from sqlmodel import SQLModel, create_engine
|
||||
|
||||
from .config import settings
|
||||
|
||||
# Create database engine using URL from config
|
||||
engine = create_engine(
|
||||
settings.database_url,
|
||||
connect_args={"check_same_thread": False} if settings.database_url.startswith("sqlite") else {},
|
||||
poolclass=StaticPool if settings.database_url.startswith("sqlite") else None,
|
||||
echo=settings.test_mode, # Enable SQL logging for debugging in test mode
|
||||
)
|
||||
# Create database engine using URL from config with performance optimizations
|
||||
if settings.database_url.startswith("sqlite"):
|
||||
engine = create_engine(
|
||||
settings.database_url,
|
||||
connect_args={
|
||||
"check_same_thread": False,
|
||||
"timeout": 30
|
||||
},
|
||||
poolclass=StaticPool,
|
||||
echo=settings.test_mode, # Enable SQL logging for debugging in test mode
|
||||
pool_pre_ping=True, # Verify connections before using
|
||||
)
|
||||
else:
|
||||
# PostgreSQL/MySQL with connection pooling
|
||||
engine = create_engine(
|
||||
settings.database_url,
|
||||
pool_size=10, # Number of connections to maintain
|
||||
max_overflow=20, # Additional connections when pool is exhausted
|
||||
pool_pre_ping=True, # Verify connections before using
|
||||
pool_recycle=3600, # Recycle connections after 1 hour
|
||||
echo=settings.test_mode, # Enable SQL logging for debugging in test mode
|
||||
)
|
||||
|
||||
|
||||
def create_db_and_tables():
|
||||
|
||||
Reference in New Issue
Block a user