b75ec8ad Moved members-migrations out of the background jobs system
ref https://linear.app/ghost/issue/HKG-1983/move-members-migrations-out-of-the-background-jobs-system
The members-migrations job runs the 2021-era Stripe backfills at most once
per site and boot waits for it, so it was never really a background job. It
only used @tryghost/job-manager's one-off feature for its "already ran" row,
and it is the last production user of that feature, which blocks removing
the library in HKG-1985.
The members service now does the same work directly during startup: read
the jobs row, run the backfills when it is missing or failed, then write the
row. The skip rule is unchanged (any status except failed means skip), the
row is still written when Stripe is not connected, and boot still blocks.
The row is written after the run so an interrupted run retries next boot,
the 500ms polling loop is gone, and the test-environment skip is dropped so
the code is covered by the new e2e boot test. The welcome emails integration
test now awaits the members service init, because init touches the jobs
table in test environments from here on. 799bc485 Moved members-migrations out of the background jobs system
ref https://linear.app/ghost/issue/HKG-1983/move-members-migrations-out-of-the-background-jobs-system
The members-migrations job runs the 2021-era Stripe backfills at most once
per site and boot waits for it, so it was never really a background job. It
only used @tryghost/job-manager's one-off feature for its "already ran" row,
and it is the last production user of that feature, which blocks removing
the library in HKG-1985.
The members service now does the same work directly during startup: read
the jobs row, run the backfills when it is missing or failed, then write the
row. The skip rule is unchanged (any status except failed means skip), the
row is still written when Stripe is not connected, and boot still blocks.
The row is written after the run so an interrupted run retries next boot,
the 500ms polling loop is gone, and the test-environment skip is dropped so
the code is covered by the new e2e boot test. The welcome emails integration
test now awaits the members service init, because init touches the jobs
table in test environments from here on.