Raising retry_after stops one dispatch from being re-reserved, but it does nothing against a *duplicate* dispatch. The ai queue runs two concurrent workers, so a double "Enable AI" click (or re-enabling consent mid-run) launches two backfills that read the same pending snapshot and both bill the model — the very harm tries=1 was meant to avoid but structurally cannot. Implement ShouldBeUnique keyed on the user id, mirroring the sibling RetryTransientAiCategorizationJob, so a user has at most one backfill in flight. Add a test anchoring the dedup key. |
||
|---|---|---|
| .. | ||
| .pest | ||
| Browser | ||
| Feature | ||
| Fixtures | ||
| Performance | ||
| Support | ||
| Unit | ||
| Pest.php | ||
| TestCase.php | ||
| bootstrap.php | ||