...
|
...
|
@@ -5,13 +5,15 @@ include_once __DIR__."/../vendor/autoload.php"; |
|
|
|
|
|
|
|
|
swoole_set_process_name('php-email-sync-list');
|
|
|
|
|
|
//TODO:: 不知道为什么,隔断时间mysql会连不上
|
|
|
\Co\run(function (){
|
|
|
|
|
|
$start_time = time();
|
|
|
$goNum = 0;
|
|
|
// 循环阻塞
|
|
|
while (true){
|
|
|
|
|
|
if (time() - $start_time > 24000){ break; }
|
|
|
|
|
|
if($goNum > 50){
|
|
|
co::sleep(0.5);
|
|
|
continue;
|
...
|
...
|
@@ -86,6 +88,10 @@ swoole_set_process_name('php-email-sync-list'); |
|
|
|
|
|
}
|
|
|
|
|
|
while ($goNum > 0){
|
|
|
co::sleep(1);
|
|
|
}
|
|
|
|
|
|
|
|
|
});
|
|
|
|
...
|
...
|
|