fix(extraction-service): fix QueueJob generic type mismatch in createJob
enqueue() returns QueueJob<TPayload, unknown> since no result exists at enqueue time. mapQueueJob expects ExtractionJobResult. Cast at the call site since newly enqueued jobs have undefined result and all accesses use optional chaining.
This commit is contained in:
parent
90f8f64937
commit
548f7199bf
@ -219,7 +219,7 @@ export async function createJob(
|
||||
},
|
||||
productId: process.env.DEFAULT_PRODUCT_ID,
|
||||
});
|
||||
return mapQueueJob(job);
|
||||
return mapQueueJob(job as QueueJob<ExtractionJobPayload, ExtractionJobResult>);
|
||||
}
|
||||
|
||||
export async function getJob(jobId: string): Promise<ExtractionJob | undefined> {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user