Parametrized count of runs via JOBS environment varriable
This commit is contained in:
parent
7d910a3aa0
commit
3b757304f7
4
Makefile
4
Makefile
|
@ -27,10 +27,10 @@ launcher:
|
|||
docker build -t $(TAGBASE)-launcher ./launcher-image
|
||||
|
||||
run-launcher: launcher
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -it --rm $(TAGBASE)-launcher
|
||||
docker run -e JOBS=4 -v /var/run/docker.sock:/var/run/docker.sock -it --rm $(TAGBASE)-launcher
|
||||
|
||||
run-launcher-detached: launcher
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -itd --rm $(TAGBASE)-launcher
|
||||
docker run -e JOBS=8 -v /var/run/docker.sock:/var/run/docker.sock -itd --rm $(TAGBASE)-launcher
|
||||
|
||||
# wizzard
|
||||
wizzard: mirror run-creator
|
||||
|
|
|
@ -8,6 +8,7 @@ lock=/var/run/cloner.pid
|
|||
volume_prefix=cloner
|
||||
clone_prefix=cloner-runner
|
||||
|
||||
max_jobs=${JOBS:-3}
|
||||
|
||||
function die(){
|
||||
echo $@ 1>&2
|
||||
|
@ -35,5 +36,5 @@ function listVolumes(){
|
|||
}
|
||||
|
||||
# run for every volume in parallel
|
||||
listVolumes | parallel --lb -j 3 -n 1 run-mirror-update
|
||||
listVolumes | parallel --lb -j $max_jobs -n 1 run-mirror-update
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user