Метод saveJobRow

private

Сигнатура метода

private function saveJobRow(?string $hash, ?int $previousJobId, array $fields): AddResult|UpdateResult

Возвращает: AddResult|UpdateResult

Описание

The single write point of the queue row: a null $previousJobId inserts a new row, an id updates that row. The job hash comes from the `ai` module, which is allowed to reuse the hash of a job that is still alive, while IX_CRM_AI_QUEUE_HASH forbids a second row with it. A hash held by a row other than the one being updated refuses the launch with the "job already exists" error and leaves that row untouched. Its execution status and creation time go to the log: a hash held by an already finished row makes the refusal permanent instead of a wait for the callback of the first attempt.

Параметры

3
Имя Тип По умолчанию Флаги
$hash ?string —
—
$previousJobId ?int —
—
$fields array —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/integration/ai/operation/abstractoperation.php
Расположение метода в файле
Строки 792–850

Исходный код

PHP