- Модуль: mail
- Путь к файлу: ~/bitrix/modules/mail/lib/helper/mailbox.php
- Класс: BitrixMailHelperMailbox
- Вызов: Mailbox::findIncompleteMessages
private function findIncompleteMessages(int $count)
{
$resyncTime = new MainTypeDateTime();
$resyncTime->add('- '.static::MESSAGE_RESYNCHRONIZATION_TIME.' seconds');
return MailMailMessageUidTable::getList([
'select' => array(
'MSG_UID',
'DIR_MD5',
),
'filter' => array(
'=MAILBOX_ID' => $this->mailbox['ID'],
'=MESSAGE_ID' => '0',
'=IS_OLD' => 'D',
/*We give the message time to load.
In order not to catch the message that are in the process of downloading*/
'<=DATE_INSERT' => $resyncTime,
),
'limit' => $count,
]);
}