After a batch is processed, some reviews may have status completed and others failed. In AI Review Moderation for Magento 2 1.0.16, the retry job selects failed entries individually. It checks the count of failed attempts and the time since the queue entry was updated.
Record the attempt limit and delay in a test environment
Under Review AI → General, set Environment to Testing and enable Use Mock Batch API and Enable Audit Logs. In Retry and Error Handling, check Max Retry Attempts and Retry Interval (minutes). The trial used a limit of 3 and a 10-minute delay. The kowal_review_ai_retry_failed_reviews job looks for failed entries with attempts < 3 and a sufficiently old updated_at. Review Moderation AI documentation.
Trace three reviews through the same batch
The local simulation used the original mock provider and result processor. Two test replies were deliberately given an invalid value. Review 701 processed successfully, while 702 and 703 went to failed. Once the delay was simulated, only 702 moved to pending. The batch was marked archived after processing.
| Review ID | After batch processing | Attempts count | First check | After the delay | Retry event |
|---|---|---|---|---|---|
701 · Valid result | completed | 0 | completed | completed | — |
702 · Failure below the limit | failed | 1 | failed | pending | retry_scheduled |
703 · Failure at the limit | failed | 3 | failed | failed | — |
Confirm the change by review ID
Review 702 received one retry_scheduled entry. The job cleared its batch_id and custom_id and kept its attempt count at 1. On a further run, 702 was still pending for a new batch. Look up the event by review_id in the audit. The default job checks the queue every 30 minutes. After the delay, also check the last run in cron_schedule.
Queue results can help with measuring moderation costs in a pilot.
