mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-22 22:20:07 +08:00

### What problem does this PR solve? ### Type of change - [x] Other (please describe): Use environment variable to control the task executor processor number.
28 lines
342 B
Bash
28 lines
342 B
Bash
#!/bin/bash
|
|
|
|
/usr/sbin/nginx
|
|
|
|
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
|
|
|
|
PY=python3
|
|
if [[ -z "$WS" || $WS -lt 1 ]]; then
|
|
WS=1
|
|
fi
|
|
|
|
function task_exe(){
|
|
while [ 1 -eq 1 ];do
|
|
$PY rag/svr/task_executor.py ;
|
|
done
|
|
}
|
|
|
|
for ((i=0;i<WS;i++))
|
|
do
|
|
task_exe &
|
|
done
|
|
|
|
while [ 1 -eq 1 ];do
|
|
$PY api/ragflow_server.py
|
|
done
|
|
|
|
wait;
|