正在显示
1 个修改的文件
包含
35 行增加
和
21 行删除
@@ -39,6 +39,39 @@ class AutoMail { | @@ -39,6 +39,39 @@ class AutoMail { | ||
39 | $this->fids = $this->db->all("select `id` from `folders` where `folder` = '收件箱'"); | 39 | $this->fids = $this->db->all("select `id` from `folders` where `folder` = '收件箱'"); |
40 | $this->fids = array_column($this->fids,'id'); | 40 | $this->fids = array_column($this->fids,'id'); |
41 | 41 | ||
42 | + $filter = '2 Automatic reply | ||
43 | +2 Delivery | ||
44 | +2 Automatische Antwort | ||
45 | +2 Undeliverable | ||
46 | +2 Failure | ||
47 | +2 Undelivered | ||
48 | +1 noreply | ||
49 | +1 postmaster | ||
50 | +1 email-notifications | ||
51 | +1 mailer-daemon | ||
52 | +1 no-reply | ||
53 | +2 自动回复 | ||
54 | +2 Returned mail | ||
55 | +2 Autosvar | ||
56 | +2 Out Of Office Re | ||
57 | +2 Change_of_email_address | ||
58 | +2 delivered | ||
59 | +2 automatique | ||
60 | +2 Reply auto | ||
61 | +2 automatic | ||
62 | +2 Request received | ||
63 | +2 Automatisch | ||
64 | +2 Unzustellbar | ||
65 | +2 Notification | ||
66 | +2 expired'; | ||
67 | + $filter = explode("\r\n",$filter); | ||
68 | + foreach ($filter as $f) { | ||
69 | + if (!$f) continue; | ||
70 | + $this->filter[] = [ | ||
71 | + intval(mb_substr($f, 0, 1)), | ||
72 | + trim(mb_substr($f, 1, 99)), | ||
73 | + ]; | ||
74 | + } | ||
42 | 75 | ||
43 | if(redis()->add('auto_mail_sync2',1,60)){ | 76 | if(redis()->add('auto_mail_sync2',1,60)){ |
44 | echo '正在计算数据'; | 77 | echo '正在计算数据'; |
@@ -74,26 +107,7 @@ class AutoMail { | @@ -74,26 +107,7 @@ class AutoMail { | ||
74 | 107 | ||
75 | } | 108 | } |
76 | 109 | ||
77 | - private $filter = [ | ||
78 | - ['2','Automatic reply'], | ||
79 | - ['2','Delivery'], | ||
80 | - ['2','Automatische Antwort:'], | ||
81 | - ['2','Automatic_reply'], | ||
82 | - ['2','Undeliverable'], | ||
83 | - ['2','Failure'], | ||
84 | - ['2','Undelivered'], | ||
85 | - ['1','noreply'], | ||
86 | - ['1','postmaster'], | ||
87 | - ['1','email-notifications'], | ||
88 | - ['1','mailer-daemon'], | ||
89 | - ['1','no-reply'], | ||
90 | - ['2','自动回复'], | ||
91 | - ['2','Returned mail'], | ||
92 | - ['2','Autosvar'], | ||
93 | - ['2','Out Of Office Re'], | ||
94 | - ['2','Change_of_email_address'], | ||
95 | - ['2','delivered'] | ||
96 | - ]; | 110 | + private $filter = []; |
97 | 111 | ||
98 | private function run($id){ | 112 | private function run($id){ |
99 | $list = $this->db->all(\Model\listsSql::all(dbWhere(['id'=>$id]),'`id`,`from`,`subject`,`folder_id`')); | 113 | $list = $this->db->all(\Model\listsSql::all(dbWhere(['id'=>$id]),'`id`,`from`,`subject`,`folder_id`')); |
@@ -129,7 +143,7 @@ swoole_set_process_name('auto-reply-run-man'); | @@ -129,7 +143,7 @@ swoole_set_process_name('auto-reply-run-man'); | ||
129 | 143 | ||
130 | $pm = new Swoole\Process\Manager(); | 144 | $pm = new Swoole\Process\Manager(); |
131 | 145 | ||
132 | -$pm->addBatch(2,function (){ | 146 | +$pm->addBatch(10,function (){ |
133 | 147 | ||
134 | swoole_set_process_name('auto-reply-email-run'); | 148 | swoole_set_process_name('auto-reply-email-run'); |
135 | 149 |
-
请 注册 或 登录 后发表评论