aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/worker/workers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/worker/workers')
-rw-r--r--server/lib/worker/workers/image-downloader.ts2
-rw-r--r--server/lib/worker/workers/image-processor.ts7
2 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/worker/workers/image-downloader.ts b/server/lib/worker/workers/image-downloader.ts
index 8d4a6b37e..4b32f723e 100644
--- a/server/lib/worker/workers/image-downloader.ts
+++ b/server/lib/worker/workers/image-downloader.ts
@@ -18,7 +18,7 @@ async function downloadImage (options: {
18 const destPath = join(destDir, destName) 18 const destPath = join(destDir, destName)
19 19
20 try { 20 try {
21 await processImage(tmpPath, destPath, size) 21 await processImage({ path: tmpPath, destination: destPath, newSize: size })
22 } catch (err) { 22 } catch (err) {
23 await remove(tmpPath) 23 await remove(tmpPath)
24 24
diff --git a/server/lib/worker/workers/image-processor.ts b/server/lib/worker/workers/image-processor.ts
new file mode 100644
index 000000000..0ab41a5a0
--- /dev/null
+++ b/server/lib/worker/workers/image-processor.ts
@@ -0,0 +1,7 @@
1import { processImage } from '@server/helpers/image-utils'
2
3module.exports = processImage
4
5export {
6 processImage
7}