diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-24 16:31:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-24 16:31:48 +0200 |
commit | c53853ca1b8e32aea5259d436d3d284b9d178919 (patch) | |
tree | dfb081e7fb471ca4b75fd67eabd3216cc6b33129 /server/controllers | |
parent | 2873f00bd89d8f1b5f88614415f8142a5c2065c3 (diff) | |
download | PeerTube-c53853ca1b8e32aea5259d436d3d284b9d178919.tar.gz PeerTube-c53853ca1b8e32aea5259d436d3d284b9d178919.tar.zst PeerTube-c53853ca1b8e32aea5259d436d3d284b9d178919.zip |
Introduce worker threads to process remote images
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/lazy-static.ts | 4 |
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' | |||
6 | import { logger } from '../helpers/logger' | 6 | import { logger } from '../helpers/logger' |
7 | import { ACTOR_IMAGES_SIZE, LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants' | 7 | import { ACTOR_IMAGES_SIZE, LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants' |
8 | import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache' | 8 | import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache' |
9 | import { actorImagePathUnsafeCache, pushActorImageProcessInQueue } from '../lib/local-actor' | 9 | import { actorImagePathUnsafeCache, downloadActorImageFromWorker } from '../lib/local-actor' |
10 | import { asyncMiddleware } from '../middlewares' | 10 | import { asyncMiddleware } from '../middlewares' |
11 | import { ActorImageModel } from '../models/actor/actor-image' | 11 | import { 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), |