Download sync_loop.sh from lvwerra/messenger: direct link, hf CLI and curl.
- Browser
- Download file 380 Bytes
-
https://huggingface.co/spaces/lvwerra/messenger/resolve/main/sync_loop.sh
- Command line
-
hf download hf://spaces/lvwerra/messenger/sync_loop.sh
-
curl -L -o sync_loop.sh https://huggingface.co/spaces/lvwerra/messenger/resolve/main/sync_loop.sh
380 Bytes
| # 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 | |