Skip to content

Commit

Permalink
[parser] remove old snapshots from dir before download
Browse files Browse the repository at this point in the history
  • Loading branch information
ochaloup committed Dec 16, 2024
1 parent 14854a3 commit 2791875
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scraper/buildkite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ steps:
env:
RUST_BACKTRACE: 1
commands:
- snapshot_dir=$(buildkite-agent meta-data get snapshot_dir)
- find "$$snapshot_dir" -maxdepth 1 -type f ! -name 'genesis.tar.bz2' -exec rm -f {} \;
# Wait between attempts
- '[[ $$BUILDKITE_RETRY_COUNT -gt 0 ]] && echo "Retry $$BUILDKITE_RETRY_COUNT, waiting for 5 minutes" && sleep 300'
# Downloading
- 'echo "--------- DOWNLOAD ---------"'
- snapshot_dir=$(buildkite-agent meta-data get snapshot_dir)
- |
# https://github.com/c29r3/solana-snapshot-finder
docker run -it --rm -v "$$snapshot_dir":/solana/snapshot --user $(id -u):$(id -g) c29r3/solana-snapshot-finder:latest --snapshot_path /solana/snapshot --max_snapshot_age 20000 --min_download_speed 30 --max_latency 500 | tee ./log.out
Expand Down

0 comments on commit 2791875

Please sign in to comment.