fix: replace datetime.UTC with timezone.utc for Python 3.12+ compatibility
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 22s
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
CLI Tests / test-cli (push) Failing after 13s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 3s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m34s
Documentation Validation / validate-docs (push) Failing after 10s
Documentation Validation / validate-policies-strict (push) Successful in 3s
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
Integration Tests / test-service-integration (push) Successful in 2m42s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 3s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 33s
Package Tests / Python package - aitbc-core (push) Successful in 17s
Package Tests / Python package - aitbc-crypto (push) Successful in 11s
Security Scanning / security-scan (push) Has been cancelled
Package Tests / Python package - aitbc-sdk (push) Successful in 13s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 9s
Package Tests / JavaScript package - aitbc-token (push) Successful in 17s
Staking Tests / test-staking-service (push) Failing after 6s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 22s
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
CLI Tests / test-cli (push) Failing after 13s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 3s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m34s
Documentation Validation / validate-docs (push) Failing after 10s
Documentation Validation / validate-policies-strict (push) Successful in 3s
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
Integration Tests / test-service-integration (push) Successful in 2m42s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 3s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 33s
Package Tests / Python package - aitbc-core (push) Successful in 17s
Package Tests / Python package - aitbc-crypto (push) Successful in 11s
Security Scanning / security-scan (push) Has been cancelled
Package Tests / Python package - aitbc-sdk (push) Successful in 13s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 9s
Package Tests / JavaScript package - aitbc-token (push) Successful in 17s
Staking Tests / test-staking-service (push) Failing after 6s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
This commit is contained in:
12
dev/cache/aitbc_cache/gpu_marketplace_cache.py
vendored
12
dev/cache/aitbc_cache/gpu_marketplace_cache.py
vendored
@@ -9,7 +9,7 @@ import asyncio
|
||||
import logging
|
||||
from typing import Dict, List, Optional, Any, Tuple
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, UTC, timedelta
|
||||
from datetime import datetime, timezone, timedelta
|
||||
import json
|
||||
|
||||
from .event_driven_cache import (
|
||||
@@ -110,7 +110,7 @@ class GPUMarketplaceCacheManager:
|
||||
'region': region,
|
||||
'gpu_type': gpu_type,
|
||||
'include_busy': include_busy,
|
||||
'timestamp': datetime.now(datetime.UTC).isoformat()
|
||||
'timestamp': datetime.now(timezone.utc).isoformat()
|
||||
}
|
||||
|
||||
cached_data = await self.cache.get('gpu_availability', params)
|
||||
@@ -153,7 +153,7 @@ class GPUMarketplaceCacheManager:
|
||||
for gpu in gpus:
|
||||
if gpu.gpu_id == gpu_id:
|
||||
gpu.availability_status = new_status
|
||||
gpu.last_updated = datetime.now(datetime.UTC)
|
||||
gpu.last_updated = datetime.now(timezone.utc)
|
||||
updated_gpu = gpu
|
||||
break
|
||||
|
||||
@@ -175,7 +175,7 @@ class GPUMarketplaceCacheManager:
|
||||
params = {
|
||||
'gpu_type': gpu_type,
|
||||
'region': region,
|
||||
'timestamp': datetime.now(datetime.UTC).isoformat()
|
||||
'timestamp': datetime.now(timezone.utc).isoformat()
|
||||
}
|
||||
|
||||
cached_data = await self.cache.get('gpu_pricing', params)
|
||||
@@ -307,7 +307,7 @@ class GPUMarketplaceCacheManager:
|
||||
|
||||
async def get_market_stats(self) -> MarketStats:
|
||||
"""Get current market statistics"""
|
||||
params = {'timestamp': datetime.now(datetime.UTC).isoformat()}
|
||||
params = {'timestamp': datetime.now(timezone.utc).isoformat()}
|
||||
|
||||
cached_data = await self.cache.get('market_stats', params)
|
||||
if cached_data:
|
||||
@@ -334,7 +334,7 @@ class GPUMarketplaceCacheManager:
|
||||
total_bookings_24h=0, # Would be calculated from database
|
||||
total_volume_24h=0.0, # Would be calculated from database
|
||||
utilization_rate=utilization_rate,
|
||||
last_updated=datetime.now(datetime.UTC)
|
||||
last_updated=datetime.now(timezone.utc)
|
||||
)
|
||||
|
||||
# Cache the statistics
|
||||
|
||||
Reference in New Issue
Block a user