- Модуль: sender
- Путь к файлу: ~/bitrix/modules/sender/lib/service/groupqueueservice.php
- Класс: Bitrix\Sender\Service\GroupQueueService
- Вызов: GroupQueueService::addToDB
public function addToDB(int $type, int $entityId, int $groupId) { if (!in_array($type, GroupQueueTable::TYPE)) { return; } if (!Locker::lock(self::LOCK_KEY, $entityId)) { return; } $current = $this->getCurrentRow($type, $entityId, $groupId); if (isset($current['ID']) || isset($current[0]['ID'])) { Locker::unlock(self::LOCK_KEY, $entityId); return; } GroupQueueTable::add([ 'TYPE' => $type, 'ENTITY_ID' => $entityId, 'GROUP_ID' => $groupId, ]); Locker::unlock(self::LOCK_KEY, $entityId); }