We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3299c8a commit de4224dCopy full SHA for de4224d
apps/media-server/src/routes/video.ts
@@ -748,7 +748,10 @@ async function processVideoAsync(
748
progress: 100,
749
message: "Processing complete",
750
});
751
- await sendWebhook(getJob(jobId)!);
+ const completedJob = getJob(jobId);
752
+ if (completedJob) {
753
+ await sendWebhook(completedJob);
754
+ }
755
756
await inputTempFile.cleanup();
757
await outputTempFile.cleanup();
@@ -892,7 +895,10 @@ video.post("/process/:jobId/cancel", async (c) => {
892
895
message: "Processing cancelled by user",
893
896
894
897
898
+ const cancelledJob = getJob(jobId);
899
+ if (cancelledJob) {
900
+ await sendWebhook(cancelledJob);
901
902
903
return c.json({
904
success: true,
0 commit comments