X-Git-Url: http://git.purplebirdman.com/godot-builder.git/blobdiff_plain/7689d5bfb58803b7f42e012afbfec16a3a6645fc..82228e6a2a172021e39c373f0c4753e51552d25c:/builder/entrypoint.sh diff --git a/builder/entrypoint.sh b/builder/entrypoint.sh index 9db721d..1013354 100755 --- a/builder/entrypoint.sh +++ b/builder/entrypoint.sh @@ -8,14 +8,17 @@ function intr() { trap intr SIGINT -echo Starting builder polling... +SLEEP_INT=$1 +[[ -n "$SLEEP_INT" ]] || SLEEP_INT=60 + +echo Starting builder polling every $SLEEP_INT seconds... # polls a redis queue for jobs, starts the builder when it's got some while true do SNAPSHOT_URI=$(redis-cli -h redis LPOP snapshots) [[ -n "$SNAPSHOT_URI" ]] && ./godot-export.sh "$SNAPSHOT_URI" - sleep 1 + sleep $SLEEP_INT done