...
|
...
|
@@ -11,7 +11,12 @@ function start(){ |
|
|
\Co\run(function (){
|
|
|
|
|
|
$cNum = 0;//协程运行的数量
|
|
|
while (true){
|
|
|
$maxRunNum = 500;
|
|
|
while ($maxRunNum){
|
|
|
$maxRunNum--;
|
|
|
if(!$maxRunNum){
|
|
|
break;
|
|
|
}
|
|
|
try {
|
|
|
// 是否要停止
|
|
|
if(redis()->get('send_job_is_stop')=='stop'){
|
...
|
...
|
@@ -153,7 +158,7 @@ function start(){ |
|
|
if(!$cNum){
|
|
|
break;
|
|
|
}
|
|
|
co::sleep(1);
|
|
|
co::sleep(0.5);
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|