| # Periodic sync of Conduit database to HF bucket | |
| while true; do | |
| sleep 60 | |
| if [ -n "$HF_TOKEN" ] && [ -d /data/conduit ]; then | |
| hf buckets sync /data/conduit/ hf://buckets/lvwerra/messenger-storage/conduit-db/ \ | |
| 2>&1 || echo "Sync failed, will retry" | |
| else | |
| echo "Sync skipped: HF_TOKEN not set or /data/conduit missing" | |
| fi | |
| done | |