| 
...
 | 
...
 | 
@@ -3,6 +3,7 @@ | 
| 
 | 
 | 
 //error_reporting();
 | 
| 
 | 
 | 
 include_once __DIR__."/../vendor/autoload.php";
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
 @file_put_contents('sync_run.log',"进程启动 ".getmypid(),FILE_APPEND);
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
 swoole_set_process_name('php-email-sync-list');
 | 
| 
 | 
 | 
 //TODO:: 不知道为什么,隔断时间mysql会连不上
 | 
| 
...
 | 
...
 | 
@@ -12,7 +13,10 @@ swoole_set_process_name('php-email-sync-list'); | 
| 
 | 
 | 
 // 循环阻塞
 | 
| 
 | 
 | 
     while (true){
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         if (time() - $start_time > 86400){ break; }
 | 
| 
 | 
 | 
         if (time() - $start_time > 43200){
 | 
| 
 | 
 | 
             @file_put_contents('sync_run.log',"进程停止 ".system("kill ".getmypid()),FILE_APPEND);
 | 
| 
 | 
 | 
             break;
 | 
| 
 | 
 | 
         }
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         if($goNum > 50){
 | 
| 
 | 
 | 
             co::sleep(0.5);
 | 
...
 | 
...
 | 
 |