remove waiting
This commit is contained in:
parent
7ff0c23c8a
commit
11c7e44267
@ -1,7 +1,6 @@
|
|||||||
import sharp from "sharp";
|
import sharp from "sharp";
|
||||||
import { getMinioClient } from "./minio";
|
import { getMinioClient } from "./minio";
|
||||||
import { lookup } from "mime-types";
|
import { lookup } from "mime-types";
|
||||||
import { sleepWithCountdown } from "./util";
|
|
||||||
|
|
||||||
export async function processImage(
|
export async function processImage(
|
||||||
bucket: string,
|
bucket: string,
|
||||||
@ -52,8 +51,6 @@ export async function processImage(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await sleepWithCountdown(5);
|
|
||||||
|
|
||||||
// 🖼️ Create thumbnail
|
// 🖼️ Create thumbnail
|
||||||
const thumb = await sharp(buffer).resize(200).toBuffer();
|
const thumb = await sharp(buffer).resize(200).toBuffer();
|
||||||
await writeImage(`${filePath}/thumbs/${fileName}`, thumb, mime);
|
await writeImage(`${filePath}/thumbs/${fileName}`, thumb, mime);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user