fix: pass buildId to worker
| | |
| | | |
| | | const childPromises: WorkerPromise<ProcessedContent[]>[] = [] |
| | | for (const chunk of chunks(fps, CHUNK_SIZE)) { |
| | | childPromises.push(pool.exec("parseFiles", [argv, chunk, ctx.allSlugs])) |
| | | childPromises.push(pool.exec("parseFiles", [ctx.buildId, argv, chunk, ctx.allSlugs])) |
| | | } |
| | | |
| | | const results: ProcessedContent[][] = await WorkerPromise.all(childPromises).catch((err) => { |
| | |
| | | import { options } from "./util/sourcemap" |
| | | |
| | | // only called from worker thread |
| | | export async function parseFiles(argv: Argv, fps: FilePath[], allSlugs: FullSlug[]) { |
| | | export async function parseFiles( |
| | | buildId: string, |
| | | argv: Argv, |
| | | fps: FilePath[], |
| | | allSlugs: FullSlug[], |
| | | ) { |
| | | const ctx: BuildCtx = { |
| | | buildId, |
| | | cfg, |
| | | argv, |
| | | allSlugs, |