SIENTIAPDE-1350: Refactor: Improve logging, configuration, and resource management. Includes .env updates, client initialization logging, and resource closing.

This commit is contained in:
2025-11-24 23:08:29 -03:00
parent 2ee66552d2
commit 463906073e
10 changed files with 53 additions and 53 deletions

View File

@@ -19,6 +19,7 @@ TEMPORAL_HOST=temporal-frontend.temporal.svc.cluster.local:7233
TEMPORAL_NAMESPACE=model-manager
TRAIN_TASK_QUEUE=train_model-queue
CLEANUP_TASK_QUEUE=cleanup-queue
TEMPORAL_USE_TLS=false
MONGODB_USERNAME=mongo_user
MONGODB_PASSWORD=mongo_db_password
@@ -36,24 +37,16 @@ MINIO_RETRY_MODE=adaptive
MINIO_CONNECT_TIMEOUT=10
MINIO_READ_TIMEOUT=60
# Workflow Activity Timeouts (in seconds)
# These timeouts are designed to handle large files (up to 200MB)
TIMEOUT_VALIDATE_PARAMS=30 # Parameter validation (fast operation)
TIMEOUT_TRAIN_MODEL=2700 # Model training (30 min for large datasets)
TIMEOUT_DELETE_FILE=120 # Delete file from MinIO (1 min)
TIMEOUT_UPDATE_DATABASE=30 # Database update operations (30 sec)
TIMEOUT_VALIDATE_PARAMS=30
TIMEOUT_TRAIN_MODEL=2700
TIMEOUT_DELETE_FILE=120
TIMEOUT_UPDATE_DATABASE=30
# Cleanup Configuration
# Cleanup retention period in hours (files older than this will be deleted)
CLEANUP_RETENTION_HOURS=24 # Default: 24 hours
# Enable dry run mode to test without actually deleting files
CLEANUP_DRY_RUN=false # Set to true for testing without deletion
# Cleanup operation timeouts
TIMEOUT_CLEANUP_MINIO=300 # MinIO cleanup timeout (5 minutes)
TIMEOUT_CLEANUP_LOCAL=120 # Local directory cleanup timeout (2 minutes)
# MinIO list operation page size for cleanup
MAX_KEYS_CLEANUP=1000 # Maximum keys per page when listing objects
# Default bucket for cleanup operations
DEFAULT_CLEANUP_BUCKET=model-training # Default bucket to clean
CLEANUP_RETENTION_HOURS=24
CLEANUP_DRY_RUN=false
TIMEOUT_CLEANUP_MINIO=300
TIMEOUT_CLEANUP_LOCAL=120
MAX_KEYS_CLEANUP=1000
DEFAULT_CLEANUP_BUCKET=model-training
EXTRA_PIP_REQUIREMENTS=git+https://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@github.com/Aignosi/sientia-mlops-library.git