正在显示
1 个修改的文件
包含
9 行增加
和
5 行删除
@@ -35,6 +35,12 @@ class HotMailArchive { | @@ -35,6 +35,12 @@ class HotMailArchive { | ||
35 | private function start(){ | 35 | private function start(){ |
36 | _echo('启动预热邮件归档处理 '.getmypid()); | 36 | _echo('启动预热邮件归档处理 '.getmypid()); |
37 | 37 | ||
38 | +// $fid = [235623,235628,235633,235638,235643,235648,235653,235658,235663,235668,235673,235678,235683,235688,235693,235698,235703,235708,235713,235718,235723,235728,235733,235738,235743,235748,235753,235758,235763,235768,235773,235778,235783,235788,235793,235798,235803,235808,235813,235818,235823,235828,235833,235838,235843,235848,235853,235858,235863,235868,235873,235878,235883,235888,235893,235898,235903,235908,235913,235918,235923,235928,235933,235938,235943,235948,235953,235958,235963,235968,235973,235978,235983,235988,235993,235998,236003,236008,236013,236018]; | ||
39 | +// foreach ($fid as $i){ | ||
40 | +// $this->move($i); | ||
41 | +// } | ||
42 | +// return 0; | ||
43 | + | ||
38 | $id = 0; | 44 | $id = 0; |
39 | while (1){ | 45 | while (1){ |
40 | $id = $this->run($id); | 46 | $id = $this->run($id); |
@@ -67,14 +73,12 @@ class HotMailArchive { | @@ -67,14 +73,12 @@ class HotMailArchive { | ||
67 | foreach ($list as $item){ | 73 | foreach ($list as $item){ |
68 | try { | 74 | try { |
69 | $ret = $this->db->throw()->insert('lists_hot',$item,false); | 75 | $ret = $this->db->throw()->insert('lists_hot',$item,false); |
70 | - }catch (Throwable $e){ | ||
71 | - $this->db->delete('lists_hot',['id'=>$item['id']]); | ||
72 | - unset($item['updated_at']); | ||
73 | - $ret = $this->db->throw()->insert('lists_hot',$item,false); | ||
74 | - } | ||
75 | if($ret){ | 76 | if($ret){ |
76 | $this->db->delete(listsSql::$table,['id'=>$item['id']]); | 77 | $this->db->delete(listsSql::$table,['id'=>$item['id']]); |
77 | } | 78 | } |
79 | + }catch (Throwable $e){ | ||
80 | + $this->db->update('lists_hot',$item,dbWhere(['id'=>$item['id']])); | ||
81 | + } | ||
78 | } | 82 | } |
79 | return true; | 83 | return true; |
80 | }); | 84 | }); |
-
请 注册 或 登录 后发表评论