Badal commited on
Commit ·
c477021
1
Parent(s): 6c5f0a6
Fix: Add timeout + error handling to prevent sync hanging
Browse filesFiles changed (2)
- Dockerfile+1
- entrypoint.sh+10-7
17 unmodified lines1819202122232417 unmodified lines zip \ unzip \ procps \ timeout \ && curl -LsSf https://hf.co/cli/install.sh | bash \ && rm -rf /var/lib/apt/lists/*
38 unmodified lines39404142424344453 unmodified lines4950515253545556575253545556575859606138 unmodified linesecho '=== [STEP 2] OPENCODE STARTED ==='
# ============================================# STEP 3: REAL-TIME CONTINUOUS SYNC# STEP 3: REAL-TIME CONTINUOUS SYNC (with timeout + error handling)# ============================================echo '=== [STEP 3] STARTING REAL-TIME SYNC ==='while true; do3 unmodified lines exit 1 fi # Real-time continuous sync (with debug output) echo "Sync: $(date)" hf sync "$SOURCE" "$BUCKET" --delete RESULT=$? echo "Sync done - Result: $RESULT" sleep 1 # Sync with 30 sec timeout to prevent hanging timeout 30 hf sync "$SOURCE" "$BUCKET" --delete --quiet # If sync fails or times out, log it but continue if [ $? -ne 0 ]; then echo "WARNING: Sync issue at $(date) - continuing..." fi sleep 2doneDockerfile+1
entrypoint.sh+10-7