call preparePython() first
Some checks failed
ci / build (push) Failing after 0s
ci / Tests & Checks (push) Failing after 1s

This commit is contained in:
CJ_Clippy 2025-07-19 13:14:52 -08:00
parent a1094f96a6
commit a9b6651d91

View File

@ -1,12 +1,12 @@
import type { Task, Helpers } from "graphile-worker";
import type { Helpers } from "graphile-worker";
import { PrismaClient } from "../../generated/prisma";
import { withAccelerate } from "@prisma/extension-accelerate";
import { getOrDownloadAsset } from "../utils/cache";
import { env } from "../config/env";
import { S3Client } from "@aws-sdk/client-s3";
import { getS3Client, uploadFile } from "../utils/s3";
import { nanoid } from "nanoid";
import { getNanoSpawn } from "../utils/nanoSpawn";
import { preparePython } from "../utils/python";
const prisma = new PrismaClient().$extends(withAccelerate());
@ -23,7 +23,7 @@ async function createThumbnail(helpers: Helpers, inputFilePath: string) {
throw new Error("inputFilePath is missing");
}
await preparePython()
const outputFilePath = inputFilePath.replace(/\.[^/.]+$/, '') + '-thumb.png';
const spawn = await getNanoSpawn();
const result = await spawn('vcsi', [