feat: add job splitter to PDF pipelines - #178
Draft
mirdono wants to merge 4 commits into
Draft
Conversation
Add a task splitter in front of the pdf-scraper service. This will split the pdf-scraping job into one task per provided URL.
Add a task splitter in front of the pdf-scraper service. This will split the pdf-scraping job into one task per provided URL.
mirdono
force-pushed
the
feat/add-job-splitter-to-pdf-pipelines
branch
from
July 28, 2026 12:04
334802b to
b1e0dc7
Compare
Add a split task between the ELI Expression/Work extraction and translation. This allows the job-splitter to create one task per extracted expression resource.
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.
The PDF pipelines currently create a single task per step. Such tasks may cover multiple PDFs and many decisions. Consequently, it difficult to selectively restart, for example, the enrichment for a specific decision after it failed. This would require either restarting the task as a whole, redoing to work for all resources, or manually starting a new job.
Therefore, this PR adds the annotation-job-splitter service to the existing PDF pipelines. This splits the tasks into smaller ones, e.g. per ELI expression, that can be more easily restarted.
Approach
The app contains to pipelines that involve PDFs:
pdf-to-eliandpdf-to-enriched. For both we add a new split task in between the initialsingleton-joband thepdf-scrapingtask. This split task allows the job-splitter service to create one task per URL the user provided as input.Furthermore, the
pdf-to-enrichedjob is extended with a second split task between itspdf-to-elistep andtranslatingstep. This allows the job-splitter service to create atranslatingtask per ELI Expression that was extracted in the preceding step. This way the job-controller service will take of creating the appropriate follow-up enrichment tasks, similar to other enrichment pipelines.How to test
annotation-job-splitterand re-up the service.job-controllerandannotation-job-splitterservices such that they load the modified configurations:docker compose restart job-controller annotation-job-splitter.Related PRs
TODO
pdf-contentto version containing the functionality added in #32Related tickets