Метод checkPreviousJobs

protected static

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

protected static function checkPreviousJobs(ItemIdentifier $target, int $parentId): Main\Result

Возвращает: Main\Result

Описание

Idempotency / dedup policy (ALG-01) keyed by the single job-per-manager invariant (ENTITY_ID = managerId, TYPE_ID). Returning an error blocks a new AI job; returning success with previousJob set makes launch() relaunch by updating that same row. The SUCCESS cache-hit decision is owned entirely by deliverCachedIfFresh() upstream: launchGenerateManagerSummary() (the only entry point) always calls it before launch(), and it is date-aware. This static pre-check has neither the recipient userId nor the reference date, so a now-based check here would drift from that decision. Hence SUCCESS always relaunches by reusing the single row; PENDING and ERROR branches stay unchanged.

Параметры

2
Имя Тип По умолчанию Флаги
$target ItemIdentifier —
—
$parentId int —
—

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

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

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

Исходный код

PHP