File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script expects DATABASE and COLLECTOR_NAME to be defined in the environment
4+
5+ set -u -o pipefail
6+
7+ echo " Running job queue collector"
8+
9+ export RUST_LOG=collector=trace,collector::sysroot=debug
10+ export PATH=" /home/collector/.cargo/bin:$PATH "
11+
12+ while : ; do
13+ # Update and rebuild the collector.
14+ git pull
15+ git reset --hard @{upstream}
16+
17+ # Make sure we have a recent build, so that we can successfully build
18+ # the collector.
19+ rustup update stable
20+ cargo +stable build --release -p collector
21+
22+ CURRENT_SHA=` git rev-parse HEAD`
23+
24+ target/release/collector benchmark_job_queue \
25+ --db " ${DATABASE} " \
26+ --check_git_sha \
27+ --git_sha " ${CURRENT_SHA} "
28+ --collector_name " ${COLLECTOR_NAME} "
29+
30+ STATUS=$?
31+ echo finished run at ` date` with exit code $STATUS
32+
33+ # Wait a bit if the command has failed.
34+ if [ $STATUS -ne 0 ]; then
35+ sleep 60
36+ fi
37+ done
You can’t perform that action at this time.
0 commit comments