try with more cores
This commit is contained in:
parent
00ea2ff146
commit
fa914e8e26
1 changed files with 1 additions and 2 deletions
|
|
@ -25,7 +25,6 @@ check_sql() {
|
|||
# Run sqlfluff parse on the file and capture the output
|
||||
OUTPUT=$(sqlfluff parse --dialect postgres "$sql_file" 2>&1)
|
||||
|
||||
echo "Output"
|
||||
# Check if the output contains a parsing error
|
||||
if echo "$OUTPUT" | grep -q "==== parsing violations ===="; then
|
||||
echo "Error in file: $sql_file"
|
||||
|
|
@ -38,7 +37,7 @@ check_sql() {
|
|||
export -f check_sql
|
||||
|
||||
# Run in parallel (adjust `-P` to change concurrency level)
|
||||
find "$SQL_DIR" -type f -name "*.sql" | xargs -P 4 -I {} bash -c 'check_sql "$@"' _ {}
|
||||
find "$SQL_DIR" -type f -name "*.sql" | xargs -P 8 -I {} bash -c 'check_sql "$@"' _ {}
|
||||
|
||||
# Check exit status of xargs
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue