Skip to content

Search jobs: pass db handle to jobs at runtime

Created by: camdencheek

This modifies the Run signature on jobs to take a db handle instead of a repo pager. The repo pager can be constructed from a db handle and a set of repo options, and many of the jobs already store the repo options on their struct.

By passing in a db handle to Run(), we remove all (I think) "runtime" fields from the job structs. As a cool side effect, this means we could theoretically fully serialize and deserialize a job tree. I don't have any specific use cases for this in mind, but it seems neat.

This change is mostly just to match my mental model of the separation between "runtime" values and "static" values.

Stacked on #30067

Merge request reports

Loading