remove unused queue.py module and refactor chain_id handling in CLI
Some checks failed
CLI Tests / test-cli (push) Failing after 3s
Security Scanning / security-scan (push) Successful in 1m23s
Blockchain Synchronization Verification / sync-verification (push) Failing after 6s
P2P Network Verification / p2p-verification (push) Successful in 11s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 8s

Deleted aitbc/queue.py containing TaskQueue, JobScheduler, BackgroundTaskManager, and WorkerPool classes that were not being used in the codebase.

Refactored chain_id handling in CLI to use centralized get_chain_id utility function instead of duplicating chain_id detection logic in send_transaction, get_balance, and agent_operations functions.
This commit is contained in:
aitbc
2026-04-25 09:10:12 +02:00
parent ac0d4b3f45
commit 787ddcdae3
11 changed files with 157 additions and 457 deletions

View File

@@ -101,6 +101,11 @@ def version():
default=None,
help="API key for authentication"
)
@click.option(
"--chain-id",
default=None,
help="Chain ID for multichain operations (e.g., ait-mainnet, ait-devnet)"
)
@click.option(
"--output",
default="table",
@@ -119,7 +124,7 @@ def version():
help="Enable debug mode"
)
@click.pass_context
def cli(ctx, url, api_key, output, verbose, debug):
def cli(ctx, url, api_key, chain_id, output, verbose, debug):
"""AITBC CLI - Command Line Interface for AITBC Network
Manage jobs, mining, wallets, blockchain operations, marketplaces, and AI
@@ -142,6 +147,11 @@ def cli(ctx, url, api_key, output, verbose, debug):
ctx.obj['output'] = output
ctx.obj['verbose'] = verbose
ctx.obj['debug'] = debug
# Handle chain_id with auto-detection
from aitbc_cli.utils.chain_id import get_chain_id, get_default_chain_id
default_rpc_url = url.replace('/api', '') if url else 'http://localhost:8006'
ctx.obj['chain_id'] = get_chain_id(default_rpc_url, override=chain_id)
# Add commands to CLI
cli.add_command(system)