diff options
Diffstat (limited to 'bin/reproducible_scheduler.sh')
-rwxr-xr-x | bin/reproducible_scheduler.sh | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/bin/reproducible_scheduler.sh b/bin/reproducible_scheduler.sh index f5498484..85358e27 100755 --- a/bin/reproducible_scheduler.sh +++ b/bin/reproducible_scheduler.sh @@ -6,24 +6,8 @@ . /srv/jenkins/bin/common-functions.sh common_init "$@" -set +x - -# -# define db -# -PACKAGES_DB=/var/lib/jenkins/reproducible.db -INIT=/var/lib/jenkins/reproducible.init -if [ ! -f $PACKAGES_DB ] ; then - echo "$PACKAGES_DB doesn't exist, no builds possible." - exit 1 -elif [ -f $PACKAGES_DB.lock ] ; then - for i in $(seq 0 100) ; do - sleep 15 - [ -f $PACKAGES_DB.lock ] || break - done - echo "$PACKAGES_DB.lock still exist, exiting." - exit 1 -fi +# common code defining db access +. /srv/jenkins/bin/reproducible_common.sh # # functions, see below for main @@ -157,6 +141,7 @@ schedule_packages() { # # main # +set +x update_apt SCHEDULED=$(sqlite3 ${PACKAGES_DB} 'SELECT count(name) FROM sources_scheduled') if [ $SCHEDULED -gt 250 ] ; then |