diff --git a/Makefile b/Makefile index 8cfbc8b..65ea437 100644 --- a/Makefile +++ b/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 diff --git a/launcher-image/src/cron-command b/launcher-image/src/cron-command index 76f59c8..4f0941a 100755 --- a/launcher-image/src/cron-command +++ b/launcher-image/src/cron-command @@ -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