debugging and errors
All checks were successful
Build Docker Image / build (push) Successful in 34s

This commit is contained in:
Tudor Sitaru
2025-12-23 16:47:45 +00:00
parent 2aa87e080b
commit c16f4e9aed

View File

@@ -3,6 +3,10 @@
# ParentZone Downloaders Daily Scheduler
# This script runs both the config downloader and snapshot downloader
# Set environment variables (cron doesn't inherit Docker ENV vars)
export PYTHONPATH=/app
export PYTHONUNBUFFERED=1
LOG_DIR="/app/data/logs"
LOG_FILE="$LOG_DIR/scheduler_$(date +%Y%m%d).log"
SNAPSHOT_CONFIG_FILE="/app/config/snapshot_config.json"
@@ -51,6 +55,9 @@ run_with_logging() {
# Main execution
log_message "=== ParentZone Downloaders Daily Run Started ==="
# Change to app directory first
cd /app
# Debug: Log environment information
log_message "=== DEBUG: Environment Information ==="
log_message "PATH: $PATH"
@@ -59,6 +66,7 @@ log_message "PWD: $(pwd)"
log_message "USER: $(whoami)"
log_message "which python3: $(which python3 2>&1 || echo 'NOT FOUND')"
log_message "python3 --version: $(python3 --version 2>&1 || echo 'FAILED')"
log_message "ls -la src/: $(ls -la src/ 2>&1 | head -5)"
log_message "=== END DEBUG ==="
# Check if config files exist
@@ -74,8 +82,6 @@ else
SKIP_ASSET_DOWNLOADER=false
fi
cd /app
# Run config-based asset downloader
if [ "$SKIP_ASSET_DOWNLOADER" = false ]; then
run_with_logging "python3 src/config_downloader.py --config $ASSET_CONFIG_FILE" "Config Asset Downloader"