diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-18 09:14:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-18 09:14:51 +0200 |
commit | 1f6125be8b6306ba34b5ad9df985df462ef9759c (patch) | |
tree | 9894ab5a6b239f7797303c24f21e79019b942238 /server/lib | |
parent | 9df52d660feb722404be00a50f3c8a612bec1c15 (diff) | |
download | PeerTube-1f6125be8b6306ba34b5ad9df985df462ef9759c.tar.gz PeerTube-1f6125be8b6306ba34b5ad9df985df462ef9759c.tar.zst PeerTube-1f6125be8b6306ba34b5ad9df985df462ef9759c.zip |
Optimize torrent URL update
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/job-queue/handlers/move-to-object-storage.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/move-to-object-storage.ts b/server/lib/job-queue/handlers/move-to-object-storage.ts index a0c58d211..f3b8726eb 100644 --- a/server/lib/job-queue/handlers/move-to-object-storage.ts +++ b/server/lib/job-queue/handlers/move-to-object-storage.ts | |||
@@ -2,7 +2,7 @@ import * as Bull from 'bull' | |||
2 | import { remove } from 'fs-extra' | 2 | import { remove } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { logger } from '@server/helpers/logger' | 4 | import { logger } from '@server/helpers/logger' |
5 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 5 | import { updateTorrentUrls } from '@server/helpers/webtorrent' |
6 | import { CONFIG } from '@server/initializers/config' | 6 | import { CONFIG } from '@server/initializers/config' |
7 | import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' | 7 | import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' |
8 | import { getHLSDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' | 8 | import { getHLSDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' |
@@ -106,7 +106,7 @@ async function onFileMoved (options: { | |||
106 | file.fileUrl = fileUrl | 106 | file.fileUrl = fileUrl |
107 | file.storage = VideoStorage.OBJECT_STORAGE | 107 | file.storage = VideoStorage.OBJECT_STORAGE |
108 | 108 | ||
109 | await createTorrentAndSetInfoHash(videoOrPlaylist, file) | 109 | await updateTorrentUrls(videoOrPlaylist, file) |
110 | await file.save() | 110 | await file.save() |
111 | 111 | ||
112 | logger.debug('Removing %s because it\'s now on object storage', oldPath) | 112 | logger.debug('Removing %s because it\'s now on object storage', oldPath) |