File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 fi
3636done
3737
38+ let p_num=$( grep -c processor /proc/cpuinfo) * 2+1
39+
40+ if [[ " $p_num " == " " ]]; then
41+ echo " this job can't access /proc/cpuinfo. so workers number be setting as 4."
42+ p_num=4
43+ else
44+ echo " p_num is $p_num , workers parameter is $p_num "
45+ fi
46+
3847if [[ " $fwtype " -eq $django ]]; then
3948 wsgi=${project_name} " .wsgi:application"
4049 echo " django wsgi: $wsgi "
4756
4857sed ' s/project_path/' $project_path ' /g' sample_run > $project_name ' 1' .temp
4958sed ' s/wsgi/' $wsgi ' /g' $project_name ' 1' .temp > $project_name ' 2' .temp
50- sed ' s/project_name/' $project_name ' /g' $project_name ' 2' .temp > run.sh
59+ sed ' s/project_name/' $project_name ' /g' $project_name ' 2' .temp > $project_name ' 3' .temp
60+ sed ' s/worker_number/' $p_num ' /g' $project_name ' 3' .temp > run.sh
5161
5262rm * .temp
You can’t perform that action at this time.
0 commit comments