14 lines
361 B
TypeScript
14 lines
361 B
TypeScript
import "server-only";
|
|
|
|
import { prisma } from "@/lib/db";
|
|
import type { JobProgressDetail } from "./types";
|
|
|
|
export async function updateJobProgress(jobId: string, detail: JobProgressDetail) {
|
|
await prisma.backgroundJob.update({
|
|
where: { id: jobId },
|
|
data: {
|
|
progress: detail.summary,
|
|
progressDetail: JSON.stringify(detail),
|
|
},
|
|
});
|
|
} |