Метод checkPreviousJobs
Сигнатура метода
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
~/bitrix/modulescrm/lib/integration/ai/operation/generatemanagersummary.php