diff --git a/ci-runner.sh b/ci-runner.sh index 63e4e18..b0a965e 100755 --- a/ci-runner.sh +++ b/ci-runner.sh @@ -31,6 +31,11 @@ if ! flock -n 200; then exit 0 fi +# Serialize all CI runs to avoid DB connection contention +GLOBAL_LOCK="/tmp/tsharps-ci-global.lock" +exec 201>"$GLOBAL_LOCK" +flock 201 + echo "=== TSHARPS CI Runner ===" echo "Branch: $BRANCH" echo "Commit: $COMMIT"