aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/lazy-static.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-24 16:31:32 +0200
committerChocobozzz <me@florianbigard.com>2022-06-24 16:31:48 +0200
commitc53853ca1b8e32aea5259d436d3d284b9d178919 (patch)
treedfb081e7fb471ca4b75fd67eabd3216cc6b33129 /server/controllers/lazy-static.ts
parent2873f00bd89d8f1b5f88614415f8142a5c2065c3 (diff)
downloadPeerTube-c53853ca1b8e32aea5259d436d3d284b9d178919.tar.gz
PeerTube-c53853ca1b8e32aea5259d436d3d284b9d178919.tar.zst
PeerTube-c53853ca1b8e32aea5259d436d3d284b9d178919.zip
Introduce worker threads to process remote images
Diffstat (limited to 'server/controllers/lazy-static.ts')
-rw-r--r--server/controllers/lazy-static.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts
index 8a180b5bc..0cab5dcd0 100644
--- a/server/controllers/lazy-static.ts
+++ b/server/controllers/lazy-static.ts
@@ -6,7 +6,7 @@ import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
6import { logger } from '../helpers/logger' 6import { logger } from '../helpers/logger'
7import { ACTOR_IMAGES_SIZE, LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants' 7import { ACTOR_IMAGES_SIZE, LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants'
8import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache' 8import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache'
9import { actorImagePathUnsafeCache, pushActorImageProcessInQueue } from '../lib/local-actor' 9import { actorImagePathUnsafeCache, downloadActorImageFromWorker } from '../lib/local-actor'
10import { asyncMiddleware } from '../middlewares' 10import { asyncMiddleware } from '../middlewares'
11import { ActorImageModel } from '../models/actor/actor-image' 11import { ActorImageModel } from '../models/actor/actor-image'
12 12
@@ -65,7 +65,7 @@ async function getActorImage (req: express.Request, res: express.Response, next:
65 logger.info('Lazy serve remote actor image %s.', image.fileUrl) 65 logger.info('Lazy serve remote actor image %s.', image.fileUrl)
66 66
67 try { 67 try {
68 await pushActorImageProcessInQueue({ 68 await downloadActorImageFromWorker({
69 filename: image.filename, 69 filename: image.filename,
70 fileUrl: image.fileUrl, 70 fileUrl: image.fileUrl,
71 size: getActorImageSize(image), 71 size: getActorImageSize(image),