Skip to content

Commit fd224b8

Browse files
jackyzha0MasssiveJuice08
authored andcommitted
fix: pass buildId to worker
1 parent c31dbf3 commit fd224b8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

quartz/processors/parse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise<Pro
143143

144144
const childPromises: WorkerPromise<ProcessedContent[]>[] = []
145145
for (const chunk of chunks(fps, CHUNK_SIZE)) {
146-
childPromises.push(pool.exec("parseFiles", [argv, chunk, ctx.allSlugs]))
146+
childPromises.push(pool.exec("parseFiles", [ctx.buildId, argv, chunk, ctx.allSlugs]))
147147
}
148148

149149
const results: ProcessedContent[][] = await WorkerPromise.all(childPromises).catch((err) => {

quartz/worker.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ import { createFileParser, createProcessor } from "./processors/parse"
77
import { options } from "./util/sourcemap"
88

99
// only called from worker thread
10-
export async function parseFiles(argv: Argv, fps: FilePath[], allSlugs: FullSlug[]) {
10+
export async function parseFiles(
11+
buildId: string,
12+
argv: Argv,
13+
fps: FilePath[],
14+
allSlugs: FullSlug[],
15+
) {
1116
const ctx: BuildCtx = {
17+
buildId,
1218
cfg,
1319
argv,
1420
allSlugs,

0 commit comments

Comments
 (0)