正在显示
1 个修改的文件
包含
6 行增加
和
4 行删除
| @@ -57,7 +57,7 @@ class AutoMail { | @@ -57,7 +57,7 @@ class AutoMail { | ||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | if(redis()->add('auto_mail_sync2',1,60)){ | 59 | if(redis()->add('auto_mail_sync2',1,60)){ | 
| 60 | - echo '正在计算数据'; | 60 | + _echo('正在计算数据'); | 
| 61 | $maxId = $this->db->value("select `id` from `lists` order by `id` desc limit 1"); | 61 | $maxId = $this->db->value("select `id` from `lists` order by `id` desc limit 1"); | 
| 62 | $id = 0; | 62 | $id = 0; | 
| 63 | while (1){ | 63 | while (1){ | 
| @@ -66,7 +66,7 @@ class AutoMail { | @@ -66,7 +66,7 @@ class AutoMail { | ||
| 66 | $ids[] = $i+$id; | 66 | $ids[] = $i+$id; | 
| 67 | } | 67 | } | 
| 68 | $id = end($ids); | 68 | $id = end($ids); | 
| 69 | - if($id<($maxId-100000)){ | 69 | + if($id<($maxId-200000)){ | 
| 70 | continue; | 70 | continue; | 
| 71 | } | 71 | } | 
| 72 | redis()->rPush('auto_check_ids',implode(',',$ids)); | 72 | redis()->rPush('auto_check_ids',implode(',',$ids)); | 
| @@ -75,7 +75,7 @@ class AutoMail { | @@ -75,7 +75,7 @@ class AutoMail { | ||
| 75 | break; | 75 | break; | 
| 76 | } | 76 | } | 
| 77 | } | 77 | } | 
| 78 | - echo '计算完成'; | 78 | + _echo('计算完成'); | 
| 79 | } | 79 | } | 
| 80 | 80 | ||
| 81 | 81 | ||
| @@ -83,7 +83,9 @@ class AutoMail { | @@ -83,7 +83,9 @@ class AutoMail { | ||
| 83 | $ids = redis()->lPop('auto_check_ids'); | 83 | $ids = redis()->lPop('auto_check_ids'); | 
| 84 | if($ids){ | 84 | if($ids){ | 
| 85 | $ids = explode(',',$ids); | 85 | $ids = explode(',',$ids); | 
| 86 | + _echo('开始执行 '); | ||
| 86 | $this->run($ids); | 87 | $this->run($ids); | 
| 88 | + _echo('执行结束 '); | ||
| 87 | }else{ | 89 | }else{ | 
| 88 | break; | 90 | break; | 
| 89 | } | 91 | } | 
| @@ -108,7 +110,7 @@ class AutoMail { | @@ -108,7 +110,7 @@ class AutoMail { | ||
| 108 | } | 110 | } | 
| 109 | if(stripos($haystack,$str)!==false){ | 111 | if(stripos($haystack,$str)!==false){ | 
| 110 | if(!$this->db->count("select count(*) from `lists_auto` where `list_id` = ".$item['id'])){ | 112 | if(!$this->db->count("select count(*) from `lists_auto` where `list_id` = ".$item['id'])){ | 
| 111 | - echo "插入数据 ".$item['id'].'==>'.$this->db->create('lists_auto',['list_id'=>$item['id']],false).'==>'.$haystack."\n"; | 113 | + _echo("插入数据 ".$item['id'].'==>'.$this->db->create('lists_auto',['list_id'=>$item['id']],false).'==>'.$haystack); | 
| 112 | } | 114 | } | 
| 113 | break; | 115 | break; | 
| 114 | } | 116 | } | 
- 
请 注册 或 登录 后发表评论