作者 邓超

x

... ... @@ -85,7 +85,9 @@ class AutoMail {
$ids[] = $i+$id;
}
$id = end($ids);
if($id<25900000){
continue;
}
redis()->rPush('auto_check_ids',implode(',',$ids));
if($id>$maxId){
... ... @@ -140,25 +142,29 @@ class AutoMail {
}
swoole_set_process_name('auto-reply-run-man');
$pm = new Swoole\Process\Manager();
$pm->addBatch(3,function (){
swoole_set_process_name('auto-reply-email-run');
include_once "../vendor/autoload.php";
include_once "../vendor/autoload.php";
// while(1){
new AutoMail();
// 执行完了暂停5分钟在执行
sleep(40);
// }
},true);
$pm->start();
new AutoMail();
//swoole_set_process_name('auto-reply-run-man');
//
//$pm = new Swoole\Process\Manager();
//
//$pm->addBatch(3,function (){
//
// swoole_set_process_name('auto-reply-email-run');
//
// include_once "../vendor/autoload.php";
//
//// while(1){
// new AutoMail();
// // 执行完了暂停5分钟在执行
// sleep(40);
//// }
//
//},true);
//
//$pm->start();
... ...
... ... @@ -46,6 +46,10 @@ class HotMail {
}
$id = end($ids);
if($id<25900000){
continue;
}
redis()->rPush('hot_check_ids',implode(',',$ids));
if($id>$maxId){
... ... @@ -62,8 +66,7 @@ class HotMail {
$ids = explode(',',$ids);
$this->run($ids);
}else{
echo '等待'.PHP_EOL;
co::sleep(2);
break;
}
}
... ... @@ -113,22 +116,26 @@ class HotMail {
}
swoole_set_process_name('hot-email-run-man');
$pm = new Swoole\Process\Manager();
$pm->addBatch(3,function (){
swoole_set_process_name('hot-email-run');
include_once "../vendor/autoload.php";
new HotMail();
exit();
},true);
$pm->start();
include_once "../vendor/autoload.php";
new HotMail();
//
//swoole_set_process_name('hot-email-run-man');
//
//$pm = new Swoole\Process\Manager();
//
//$pm->addBatch(3,function (){
//
// swoole_set_process_name('hot-email-run');
//
// include_once "../vendor/autoload.php";
//
// new HotMail();
//
// exit();
//},true);
//
//$pm->start();
... ...