Skip to content

feat: add job splitter to PDF pipelines - #178

Draft
mirdono wants to merge 4 commits into
developmentfrom
feat/add-job-splitter-to-pdf-pipelines
Draft

feat: add job splitter to PDF pipelines#178
mirdono wants to merge 4 commits into
developmentfrom
feat/add-job-splitter-to-pdf-pipelines

Conversation

@mirdono

@mirdono mirdono commented Jul 28, 2026

Copy link
Copy Markdown
Member

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-eli and pdf-to-enriched. For both we add a new split task in between the initial singleton-job and the pdf-scraping task. This split task allows the job-splitter service to create one task per URL the user provided as input.

Furthermore, the pdf-to-enriched job is extended with a second split task between its pdf-to-eli step and translating step. This allows the job-splitter service to create a translating task 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

  1. Check out the branch for this PR.
  2. Pull the new version of the annotation-job-splitter and re-up the service.
  3. Restart the job-controller and annotation-job-splitter services such that they load the modified configurations: docker compose restart job-controller annotation-job-splitter.
  4. Launch the harvesting dashboard from #73 and log in.
  5. Create jobs involving PDF harvesting:
    • "Harvest PDFs from Website URL & Publish as ELI" and "Harvest PDFs from Website URL, Publish as ELI and Enrich"
    • Experiment with the number of URLs you provide
  6. Check whether the appropriate amount of follow-up tasks is created.

Related PRs

  • Added functionality in annotation-job-service: #9
  • Extend the harvesting dashboard to add target shapes to PDF jobs: #73
  • Extend pdf-content-extraction-service to add target shape to job: #32

TODO

  • Bump pdf-content to version containing the functionality added in #32

Related tickets

  • LBRON-1720

mirdono added 2 commits July 28, 2026 13:59
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
mirdono force-pushed the feat/add-job-splitter-to-pdf-pipelines branch from 334802b to b1e0dc7 Compare July 28, 2026 12:04
mirdono added 2 commits July 28, 2026 18:57
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant