File tree Expand file tree Collapse file tree
producer/src/services/render Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ const ALLOWED = new Set([
1313 "cli/src/media-use/lib/lut-preset-provider.mjs" ,
1414 "producer/src/server.ts" ,
1515 "producer/src/regression-harness.ts" ,
16- "producer/src/services/render/renderDirOwner.ts" ,
1716 "aws-lambda/src/s3PlanV2Publisher.ts" ,
1817 "gcp-cloud-run/src/gcsPlanV2Publisher.ts" ,
1918] ) ;
Original file line number Diff line number Diff line change 11import {
22 existsSync ,
33 lstatSync ,
4- mkdtempSync ,
54 readFileSync ,
65 readdirSync ,
76 readlinkSync ,
87 rmSync ,
98 writeFileSync ,
109} from "node:fs" ;
1110import { hostname , uptime } from "node:os" ;
12- import { dirname , join } from "node:path" ;
11+ import { basename , dirname , join } from "node:path" ;
1312import { RENDER_TEMP_DIR } from "@hyperframes/core/project-folders" ;
13+ import { createStagingDir } from "@hyperframes/core/atomic-file" ;
1414
1515const OWNER_FILE = "owner.json" ;
1616/** Where a staging dir parks the previous output while swapping in the new one. */
@@ -42,7 +42,7 @@ function pidScope(): { host: string; boot?: string; pidns?: string } {
4242
4343/** A render's private temp dir, stamped with the process that owns it so a later sweep can tell it was abandoned. */
4444export function createOwnedRenderDir ( prefix : string ) : string {
45- const dir = mkdtempSync ( prefix ) ;
45+ const dir = createStagingDir ( dirname ( prefix ) , basename ( prefix ) ) ;
4646 const owner = { pid : process . pid , ...pidScope ( ) } ;
4747 writeFileSync ( join ( dir , OWNER_FILE ) , JSON . stringify ( owner ) ) ;
4848 return dir ;
You can’t perform that action at this time.
0 commit comments