- Модуль: imopenlines
- Путь к файлу: ~/bitrix/modules/imopenlines/lib/config.php
- Класс: BitrixImOpenLinesConfig
- Вызов: Config::sendUpdateForQueueList
static function sendUpdateForQueueList($data)
{
$isDelete = isset($data['ACTION']) && $data['ACTION'] == 'DELETE';
if (intval($data['ID']) <= 0)
return false;
if (!$isDelete && empty($data['NAME']))
return false;
if (!BitrixMainLoader::includeModule('pull'))
return false;
$userList = [];
$orm = ModelQueueTable::getList([
'select' => [
'USER_ID',
],
'filter' => [
'=USER.ACTIVE' => 'Y',
'=USER.IS_ONLINE' => 'Y',
],
'order' => [
'SORT' => 'ASC',
'ID' => 'ASC'
]
]);
while ($row = $orm->fetch())
{
$userList[] = $row['USER_ID'];
}
BitrixPullEvent::add($userList, Array(
'module_id' => 'imopenlines',
'command' => $isDelete? 'queueItemDelete': 'queueItemUpdate',
'expiry' => 3600,
'params' => Array(
'id' => $data['ID'],
'name' => $isDelete? '': $data['NAME'],
'PRIORITY' => $data['SESSION_PRIORITY'],
'queue_type' => $data['QUEUE_TYPE']
),
));
return true;
}