fix: close addressed publication recovery blockers
This commit is contained in:
@@ -72,7 +72,15 @@ async function durableJson(path: string, value: unknown): Promise<void> {
|
||||
}
|
||||
|
||||
export class PreprocessingStateStore {
|
||||
constructor(private readonly rootLease: VerifiedWorkspaceLockRootLease) {}
|
||||
private readonly rootLease: Pick<VerifiedWorkspaceLockRootLease, "assertLive" | "anchoredPath">;
|
||||
constructor(rootLease: VerifiedWorkspaceLockRootLease | string) {
|
||||
if (typeof rootLease === "string") {
|
||||
let st: ReturnType<typeof lstatSync>;
|
||||
try { st = lstatSync(rootLease); } catch { throw fail(); }
|
||||
if (!st.isDirectory() || st.isSymbolicLink()) throw fail();
|
||||
this.rootLease = { assertLive: () => { const current = lstatSync(rootLease); if (!current.isDirectory() || current.isSymbolicLink()) throw fail(); }, anchoredPath: () => rootLease };
|
||||
} else this.rootLease = rootLease;
|
||||
}
|
||||
private root(): string { this.rootLease.assertLive(); return this.rootLease.anchoredPath(); }
|
||||
private paths(input: { runId: string }) {
|
||||
id(input.runId); const root = this.root(); const base = join(root, "preprocessing");
|
||||
|
||||
Reference in New Issue
Block a user