...
|
...
|
@@ -202,6 +202,12 @@ class Mail { |
|
|
$nu = 100;
|
|
|
$msgno = 1;
|
|
|
while (true){
|
|
|
|
|
|
// 结束操作了
|
|
|
if(redis()->get(SYNC_RUNNING_REDIS_KEY) == 'stop'){
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
// 是否结束了
|
|
|
if($status['EXISTS'] < $msgno){
|
|
|
break;
|
...
|
...
|
@@ -213,7 +219,12 @@ class Mail { |
|
|
}
|
|
|
|
|
|
$uids = array_column($uids,'UID');
|
|
|
$existsUids = $db->value(listsSql::getUids($email_id,$folder_id,$uids));
|
|
|
$existsUids = $db->all(listsSql::getUids($email_id,$folder_id,$uids));
|
|
|
if(!$existsUids){
|
|
|
$existsUids = [];
|
|
|
}else{
|
|
|
$existsUids = array_column($existsUids,'uid');
|
|
|
}
|
|
|
// 获取不存在数据库的uid
|
|
|
$uids = array_diff($uids,$existsUids);
|
|
|
|
...
|
...
|
@@ -306,13 +317,8 @@ class Mail { |
|
|
|
|
|
}
|
|
|
|
|
|
$results[$key] = [];
|
|
|
}
|
|
|
|
|
|
// 结束操作了
|
|
|
if(redis()->get(SYNC_RUNNING_REDIS_KEY) == 'stop'){
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|