• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/ml/predictionqueue.php
  • Класс: Bitrix\Crm\Ml\PredictionQueue
  • Вызов: PredictionQueue::getNextRequestId
static function getNextRequestId()
{
	$row = PredictionQueueTable::getRow([
		"select" => ["ID"],
		"filter" => [
			"LOGIC" => "OR",
			[
				"=STATE" => self::STATE_IDLE
			],
			[
				"=STATE" => self::STATE_DELAYED,
				" new DateTime()
			]
		]
	]);

	return $row ? (int)$row["ID"] : false;
}