- Add utils/config.py module using python-dotenv for centralized config - Externalize Box folder IDs, paths, and timeout settings to .env files - Create .env.example template with all configuration variables - Add separate systemd service files for prod and dev environments - Update ford_qc_box_hotfolder_process.py to use config module - Update qc_engine.py and path_resolver.py with optional config support - Maintain backwards compatibility with hardcoded defaults - Update documentation in CLAUDE.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
66 lines
2.5 KiB
Text
66 lines
2.5 KiB
Text
# Ford BnP QC Configuration
|
|
# Copy this file to .env.prod or .env.dev and fill in values for your environment
|
|
|
|
# =============================================================================
|
|
# ENVIRONMENT IDENTIFICATION
|
|
# =============================================================================
|
|
# Environment name: production or development
|
|
FORD_QC_ENV=production
|
|
|
|
# =============================================================================
|
|
# BOX FOLDER IDS
|
|
# =============================================================================
|
|
# Folder monitored for incoming asset zip files
|
|
BOX_SOURCE_FOLDER_ID=332861865120
|
|
|
|
# Folder where QC reports (JSON and HTML) are uploaded
|
|
BOX_REPORT_FOLDER_ID=332864939558
|
|
|
|
# Folder where successfully processed files (with MD5 stamps) are moved
|
|
BOX_PROCESSED_FOLDER_ID=332861653811
|
|
|
|
# =============================================================================
|
|
# FILE PATHS
|
|
# =============================================================================
|
|
# Base directory for the QC system (absolute path)
|
|
# If not set, auto-detected from script location
|
|
# FORD_QC_SCRIPT_DIR=/home/box-cli/FORD_SCRIPTS/ford_qc_git_dev/ford_qc
|
|
|
|
# Path to Box JWT configuration file (relative to FORD_QC_SCRIPT_DIR or absolute)
|
|
BOX_CONFIG_FILE=ford_box_config.json
|
|
|
|
# Path for temporary downloads (relative to FORD_QC_SCRIPT_DIR or absolute)
|
|
DOWNLOAD_PATH=download_tmp
|
|
|
|
# Working directory for file extraction (relative to FORD_QC_SCRIPT_DIR or absolute)
|
|
WORKING_DIR=working
|
|
|
|
# QC profile file path (relative to FORD_QC_SCRIPT_DIR or absolute)
|
|
QC_PROFILE_PATH=profiles/ford_bnp.json
|
|
|
|
# Fallback working directory (used when primary cannot be created)
|
|
FALLBACK_WORKING_DIR=/home/box-cli/FORD_SCRIPTS/FORD_ASSET_PACK_QC_NEW/working
|
|
|
|
# =============================================================================
|
|
# TIMEOUT AND RETRY CONFIGURATION
|
|
# =============================================================================
|
|
# Seconds to wait for Box API connection
|
|
BOX_CONNECTION_TIMEOUT=30
|
|
|
|
# Seconds to wait for Box API response
|
|
BOX_READ_TIMEOUT=90
|
|
|
|
# Maximum number of retry attempts for failed operations
|
|
MAX_RETRIES=3
|
|
|
|
# Base value for exponential backoff calculation (seconds: 2s, 4s, 8s, etc.)
|
|
RETRY_BACKOFF_BASE=2
|
|
|
|
# Seconds between systemd watchdog notifications
|
|
WATCHDOG_INTERVAL=30
|
|
|
|
# =============================================================================
|
|
# LOGGING CONFIGURATION
|
|
# =============================================================================
|
|
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
|
|
LOG_LEVEL=INFO
|