...
|
...
|
@@ -57,7 +57,7 @@ class AutoMail { |
|
|
|
|
|
|
|
|
if(redis()->add('auto_mail_sync2',1,60)){
|
|
|
echo '正在计算数据';
|
|
|
_echo('正在计算数据');
|
|
|
$maxId = $this->db->value("select `id` from `lists` order by `id` desc limit 1");
|
|
|
$id = 0;
|
|
|
while (1){
|
...
|
...
|
@@ -66,7 +66,7 @@ class AutoMail { |
|
|
$ids[] = $i+$id;
|
|
|
}
|
|
|
$id = end($ids);
|
|
|
if($id<($maxId-100000)){
|
|
|
if($id<($maxId-200000)){
|
|
|
continue;
|
|
|
}
|
|
|
redis()->rPush('auto_check_ids',implode(',',$ids));
|
...
|
...
|
@@ -75,7 +75,7 @@ class AutoMail { |
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
echo '计算完成';
|
|
|
_echo('计算完成');
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
@@ -83,7 +83,9 @@ class AutoMail { |
|
|
$ids = redis()->lPop('auto_check_ids');
|
|
|
if($ids){
|
|
|
$ids = explode(',',$ids);
|
|
|
_echo('开始执行 ');
|
|
|
$this->run($ids);
|
|
|
_echo('执行结束 ');
|
|
|
}else{
|
|
|
break;
|
|
|
}
|
...
|
...
|
@@ -108,7 +110,7 @@ class AutoMail { |
|
|
}
|
|
|
if(stripos($haystack,$str)!==false){
|
|
|
if(!$this->db->count("select count(*) from `lists_auto` where `list_id` = ".$item['id'])){
|
|
|
echo "插入数据 ".$item['id'].'==>'.$this->db->create('lists_auto',['list_id'=>$item['id']],false).'==>'.$haystack."\n";
|
|
|
_echo("插入数据 ".$item['id'].'==>'.$this->db->create('lists_auto',['list_id'=>$item['id']],false).'==>'.$haystack);
|
|
|
}
|
|
|
break;
|
|
|
}
|
...
|
...
|
|