...
|
...
|
@@ -144,19 +144,22 @@ switch ($argv[1]??0){ |
|
|
break;
|
|
|
}
|
|
|
case 'stop':{
|
|
|
echo "正在退出程序...\n非必要请不要强制kill掉进程\n";
|
|
|
\Co\run(function ($ps){
|
|
|
echo "正在退出程序...\n非必要请不要强制kill掉进程\n";
|
|
|
|
|
|
redis()->set('send_job_is_stop','stop',86400*5);
|
|
|
redis()->set('send_job_is_stop','stop');
|
|
|
|
|
|
while (true){
|
|
|
while (true){
|
|
|
|
|
|
$num = exec($ps);
|
|
|
if(!$num){
|
|
|
break;
|
|
|
$num = exec($ps);
|
|
|
if(!$num){
|
|
|
break;
|
|
|
}
|
|
|
co::sleep(0.2);
|
|
|
}
|
|
|
sleep(1);
|
|
|
}
|
|
|
echo "已退出程序\n";
|
|
|
echo "已退出程序\n";
|
|
|
},$ps);
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
default:{
|
...
|
...
|
|