...
|
...
|
@@ -33,30 +33,15 @@ class HotMail { |
|
|
* @time 2024/7/18 14:04
|
|
|
*/
|
|
|
private function start(){
|
|
|
_echo('启动预热邮件处理 '.getmypid());
|
|
|
_echo('启动预热邮件处理 ');
|
|
|
|
|
|
if(redis()->add('hot_mail_sync2',1,60)){
|
|
|
echo '正在计算数据';
|
|
|
_echo( '正在计算数据');
|
|
|
$maxId = $this->db->value("select `id` from `lists` order by `id` desc limit 1");
|
|
|
$id = 0;
|
|
|
while (1){
|
|
|
$ids = [];
|
|
|
for ($i=0;$i<1000;$i++){
|
|
|
$ids[] = $i+$id;
|
|
|
}
|
|
|
$id = end($ids);
|
|
|
|
|
|
if($id<($maxId-200000)){
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
foreach (minMaxToArray($maxId-100000,$maxId) as $ids){
|
|
|
redis()->rPush('hot_check_ids',implode(',',$ids));
|
|
|
|
|
|
if($id>$maxId){
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
echo '计算完成';
|
|
|
_echo( '计算完成');
|
|
|
redis()->delete('hot_mail_sync2');
|
|
|
}
|
|
|
|
...
|
...
|
|