作者 邓超

x

@@ -85,7 +85,9 @@ class AutoMail { @@ -85,7 +85,9 @@ class AutoMail {
85 $ids[] = $i+$id; 85 $ids[] = $i+$id;
86 } 86 }
87 $id = end($ids); 87 $id = end($ids);
88 - 88 + if($id<25900000){
  89 + continue;
  90 + }
89 redis()->rPush('auto_check_ids',implode(',',$ids)); 91 redis()->rPush('auto_check_ids',implode(',',$ids));
90 92
91 if($id>$maxId){ 93 if($id>$maxId){
@@ -140,25 +142,29 @@ class AutoMail { @@ -140,25 +142,29 @@ class AutoMail {
140 142
141 } 143 }
142 144
143 -  
144 -swoole_set_process_name('auto-reply-run-man');  
145 -  
146 -$pm = new Swoole\Process\Manager();  
147 -  
148 -$pm->addBatch(3,function (){  
149 -  
150 - swoole_set_process_name('auto-reply-email-run');  
151 -  
152 - include_once "../vendor/autoload.php"; 145 +include_once "../vendor/autoload.php";
153 146
154 // while(1){ 147 // while(1){
155 - new AutoMail();  
156 - // 执行完了暂停5分钟在执行  
157 - sleep(40);  
158 -// }  
159 -  
160 -},true);  
161 -  
162 -$pm->start(); 148 +new AutoMail();
  149 +
  150 +//swoole_set_process_name('auto-reply-run-man');
  151 +//
  152 +//$pm = new Swoole\Process\Manager();
  153 +//
  154 +//$pm->addBatch(3,function (){
  155 +//
  156 +// swoole_set_process_name('auto-reply-email-run');
  157 +//
  158 +// include_once "../vendor/autoload.php";
  159 +//
  160 +//// while(1){
  161 +// new AutoMail();
  162 +// // 执行完了暂停5分钟在执行
  163 +// sleep(40);
  164 +//// }
  165 +//
  166 +//},true);
  167 +//
  168 +//$pm->start();
163 169
164 170
@@ -46,6 +46,10 @@ class HotMail { @@ -46,6 +46,10 @@ class HotMail {
46 } 46 }
47 $id = end($ids); 47 $id = end($ids);
48 48
  49 + if($id<25900000){
  50 + continue;
  51 + }
  52 +
49 redis()->rPush('hot_check_ids',implode(',',$ids)); 53 redis()->rPush('hot_check_ids',implode(',',$ids));
50 54
51 if($id>$maxId){ 55 if($id>$maxId){
@@ -62,8 +66,7 @@ class HotMail { @@ -62,8 +66,7 @@ class HotMail {
62 $ids = explode(',',$ids); 66 $ids = explode(',',$ids);
63 $this->run($ids); 67 $this->run($ids);
64 }else{ 68 }else{
65 - echo '等待'.PHP_EOL;  
66 - co::sleep(2); 69 + break;
67 } 70 }
68 } 71 }
69 72
@@ -113,22 +116,26 @@ class HotMail { @@ -113,22 +116,26 @@ class HotMail {
113 116
114 } 117 }
115 118
116 -  
117 -swoole_set_process_name('hot-email-run-man');  
118 -  
119 -$pm = new Swoole\Process\Manager();  
120 -  
121 -$pm->addBatch(3,function (){  
122 -  
123 - swoole_set_process_name('hot-email-run');  
124 -  
125 - include_once "../vendor/autoload.php";  
126 -  
127 - new HotMail();  
128 -  
129 - exit();  
130 -},true);  
131 -  
132 -$pm->start(); 119 +include_once "../vendor/autoload.php";
  120 +
  121 +new HotMail();
  122 +
  123 +//
  124 +//swoole_set_process_name('hot-email-run-man');
  125 +//
  126 +//$pm = new Swoole\Process\Manager();
  127 +//
  128 +//$pm->addBatch(3,function (){
  129 +//
  130 +// swoole_set_process_name('hot-email-run');
  131 +//
  132 +// include_once "../vendor/autoload.php";
  133 +//
  134 +// new HotMail();
  135 +//
  136 +// exit();
  137 +//},true);
  138 +//
  139 +//$pm->start();
133 140
134 141