Fix batch assembly timeout, progress tracking, and error reporting - #19
Closed
jjroelofs wants to merge 1 commit into
Conversation
Replace entity-loading approach in getFullyAnalyzedEntityIds() with getAnalyzedEntityIds() DB queries to avoid rendering every entity during batch assembly. Fix $context['finished'] calculation that caused infinite loops when entities exceeded chunk size -- each chunk is a complete batch operation so finished must be set to 1. Report failed entity count and individual errors in batchFinished() instead of only showing the success count. Closes #18
Contributor
Author
|
Splitting into separate PRs, one per fix. |
jjroelofs
deleted the
jur/feature/centralized-batch-processing/#18-fix-batch-processing
branch
May 11, 2026 11:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #18. Three bugs in the centralized batch processing infrastructure:
getFullyAnalyzedEntityIds()rendered every entity in the bundle viahasResults()just to build an exclusion list, causing 504s even withlimit=1. Replaced withgetAnalyzedEntityIds()DB queries that never load or render entities.$context['finished']was calculated as a fraction of total entities across all operations, but each chunk is a separate batch operation. Drupal re-invoked the same operation endlessly. Now setsfinished = 1per chunk.batchFinished()only reported processed count. Now reports failed count and individual error messages.Changes
getAnalyzedEntityIds()toBatchableAnalyzerInterfacewith default[]inAnalyzePluginBasegetFullyAnalyzedEntityIds()to intersect per-analyzer DB results$context['finished'] = 1at end of each chunk operationbatchFinished()Test plan