...
|
...
|
@@ -22,9 +22,17 @@ function start(){ |
|
|
include_once __DIR__."/../vendor/autoload.php";
|
|
|
_echo("业务进程({$worker_id})启动成功");
|
|
|
|
|
|
$start_time = time();
|
|
|
|
|
|
$goNum = 0;
|
|
|
// 循环阻塞
|
|
|
while (true){
|
|
|
if($start_time+43200 > time()){
|
|
|
if($start_time+43400 > time()){
|
|
|
break;
|
|
|
}
|
|
|
co::sleep(1);
|
|
|
}
|
|
|
while ($goNum > 50){
|
|
|
co::sleep(0.5);
|
|
|
continue;
|
...
|
...
|
@@ -77,10 +85,10 @@ function start(){ |
|
|
//每次都暂停1秒,防止同一时间启动太多的任务
|
|
|
co::sleep(1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
},true);
|
|
|
|
|
|
|
...
|
...
|
|