作者 邓超

xxx

@@ -16,10 +16,11 @@ function start(){ @@ -16,10 +16,11 @@ function start(){
16 16
17 // 启动业务进程 17 // 启动业务进程
18 $pm->addBatch(10,function (Process\Pool $pool, int $worker_id){ 18 $pm->addBatch(10,function (Process\Pool $pool, int $worker_id){
19 - _echo("业务进程({$worker_id})启动成功"); 19 +
20 swoole_set_process_name('php-email-sync-list-'.$worker_id); 20 swoole_set_process_name('php-email-sync-list-'.$worker_id);
21 21
22 include_once __DIR__."/../vendor/autoload.php"; 22 include_once __DIR__."/../vendor/autoload.php";
  23 + _echo("业务进程({$worker_id})启动成功");
23 24
24 $run_timer = time(); 25 $run_timer = time();
25 // 循环阻塞 26 // 循环阻塞
@@ -69,11 +70,12 @@ function start(){ @@ -69,11 +70,12 @@ function start(){
69 70
70 // 启动一个同步内容的进程 71 // 启动一个同步内容的进程
71 $pm->add(function (Process\Pool $pool, int $worker_id){ 72 $pm->add(function (Process\Pool $pool, int $worker_id){
72 - _echo("业务进程({$worker_id})启动成功,body"); 73 +
73 swoole_set_process_name('php-email-sync-body-'.$worker_id); 74 swoole_set_process_name('php-email-sync-body-'.$worker_id);
74 75
75 include_once __DIR__."/../vendor/autoload.php"; 76 include_once __DIR__."/../vendor/autoload.php";
76 77
  78 + _echo("业务进程({$worker_id})启动成功,body");
77 $run_timer = time(); 79 $run_timer = time();
78 // 循环阻塞 80 // 循环阻塞
79 while (true){ 81 while (true){