Commit a4c30062 authored by Peter Palfrader's avatar Peter Palfrader

import-run: acquire an exclusive lock before launching the indexer

parent f9a40402
......@@ -53,7 +53,14 @@ case "$archive" in
"$BASE"/code/misc/dump-tools/add-new-dumps-to-git -c "$CONFIG" -b "$BASE"/dumps-git
snapshot index --config "$CONFIG" --quick $verbose
indexlock="$BASE/.snapshot-index.lock"
touch "$indexlock"
exec 204< "$indexlock"
if ! flock --exclusive 204; then
echo >&2 "Warning: Not running index as we don't have the lock."
else
snapshot index --config "$CONFIG" --quick $verbose
fi
ls -l "$BASE"/fuse/.ctrl-reload-database > /dev/null 2>&1 || true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment