Skip to content

Commit

Permalink
Added cpu based worker selection
Browse files Browse the repository at this point in the history
  • Loading branch information
XaverStiensmeier committed Aug 16, 2023
1 parent 7bc1f83 commit 7ed1bda
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bibigrid_rest.sh
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
uvicorn bibigrid.core.startup_rest:app --reload
#!/bin/bash
if [ "$#" -eq "0" ]
then
echo "Picked $(expr 2 \* $(nproc --all) + 1) workers (CPU+1)"
uvicorn bibigrid.core.startup_rest:app --workers $(expr 2 \* $(nproc --all) + 1)
else
uvicorn bibigrid.core.startup_rest:app --workers #1
fi

0 comments on commit 7ed1bda

Please sign in to comment.