From 4c8232a28452a49eebbeb8fea6891dfb0f4039d5 2017-11-10 16:45:58 From: Brett Smith Date: 2017-11-10 16:45:58 Subject: [PATCH] website-update: Make sqlite loading more robust. * Bail on the first error. * Allow 30 seconds to open a locked table. --- diff --git a/cron/scripts/website-update.sh b/cron/scripts/website-update.sh index 875597deca9cbd88fa06612473f1dae3cda7d3aa..b3b5c9fa834a72c61d5bbd0d2c264053ef7ee1dc 100755 --- a/cron/scripts/website-update.sh +++ b/cron/scripts/website-update.sh @@ -21,7 +21,7 @@ trap 'rmdir "$LOCKDIR"' 0 INT TERM QUIT exitcode=0 if [ "$DB_SCRIPT" -nt "$DB_FILE" ]; then - sqlite3 "$DB_FILE" <"$DB_SCRIPT" || exitcode=$? + sqlite3 -bail -cmd ".timeout 30000" "$DB_FILE" <"$DB_SCRIPT" || exitcode=$? fi # If the checkout is not on the production branch,