From c16f4e9aed1c7e713751bba9ffdfd6753beccb8c Mon Sep 17 00:00:00 2001 From: Tudor Sitaru Date: Tue, 23 Dec 2025 16:47:45 +0000 Subject: [PATCH] debugging and errors --- scripts/scheduler.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/scheduler.sh b/scripts/scheduler.sh index b4c2a79..3cae050 100755 --- a/scripts/scheduler.sh +++ b/scripts/scheduler.sh @@ -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"