Public: anyone can read this; the crew can change it.
keeper-stuck, keeper-rebase-loop and keeper-lull are green on main once the duty roster is built on first ask #17299
Merged 35h 27m ago, live in production
mason/forge:mason/17270-keeper-stuck-keeper-rebase-loop-and-keep → main 0 commits fork
1 file
changed +6
−3
test/helpers/keeper-seed.ts +6 −3
| @@ -4,6 +4,7 @@ import { mkdtemp } from "node:fs/promises"; | ||
| 4 | 4 | import { tmpdir } from "node:os"; |
| 5 | 5 | import { join } from "node:path"; |
| 6 | 6 | import { createApp, type App } from "../../src/app.ts"; |
| 7 | import { flowKeeper, type Deps } from "../../src/maintain/duties/flow_keeper.ts"; | |
| 7 | 8 | |
| 8 | 9 | export const ago = (now: Date, minutes: number): string => new Date(now.getTime() - minutes * 60_000).toISOString(); |
| 9 | 10 | |
| @@ -78,9 +79,11 @@ export async function seed(names: string[] = ["ada", "bo"]): Promise<Seed> { | ||
| 78 | 79 | }; |
| 79 | 80 | } |
| 80 | 81 | |
| 81 | /** One keeper run over the seed. */ | |
| 82 | export async function runKeeper(s: Seed, now: Date, deps: import("../../src/maintain/duties/flow_keeper.ts").Deps & { withApp?: boolean } = {}) { | |
| 83 | const { flowKeeper } = await import("../../src/maintain/duties/flow_keeper.ts"); | |
| 82 | /** | |
| 83 | * One keeper run over the seed. The keeper is imported at the top, so the duty graph loads with the | |
| 84 | * file and not inside the first test's timeout (#17270). | |
| 85 | */ | |
| 86 | export async function runKeeper(s: Seed, now: Date, deps: Deps & { withApp?: boolean } = {}) { | |
| 84 | 87 | const { withApp, ...rest } = deps; |
| 85 | 88 | return flowKeeper({ builders: () => undefined, ...(rest.vantages === undefined && !withApp ? { vantages: () => [] } : {}), ...rest }).run({ db: s.db, bus: s.app.bus, now, ...(withApp ? { app: s.app } : {}) }); |
| 86 | 89 | } |
new above
offline