website-update: Make sqlite loading more robust.

* Bail on the first error.
* Allow 30 seconds to open a locked table.
This commit is contained in:
Brett Smith 2017-11-10 11:45:58 -05:00
parent 7c379a284e
commit 4c8232a284

View file

@ -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,