Skip to content

Commit 32bf44a

Browse files
Apply suggested fix to start from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent c63c460 commit 32bf44a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

start

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,13 @@ set_real_ip_from ::/0;
384384
# Calculate number of processes, at least 2, at most 4, depending on CPU cores
385385
if [ -z "$WEBLATE_WORKERS" ]; then
386386
PROCESSORS=$(nproc)
387-
WEBLATE_WORKERS=$((PROCESSORS < 2 ? 2 : PROCESSORS > 4 ? 4 : PROCESSORS))
387+
if [ "$PROCESSORS" -lt 2 ]; then
388+
WEBLATE_WORKERS=2
389+
elif [ "$PROCESSORS" -gt 4 ]; then
390+
WEBLATE_WORKERS=4
391+
else
392+
WEBLATE_WORKERS="$PROCESSORS"
393+
fi
388394
echo "Auto-scaled to $WEBLATE_WORKERS processes, adjust by setting WEBLATE_WORKERS"
389395
fi
390396

0 commit comments

Comments
 (0)