call preparePython() first
This commit is contained in:
parent
a1094f96a6
commit
a9b6651d91
@ -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', [
|
||||
|
Loading…
x
Reference in New Issue
Block a user