aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/move-to-object-storage.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-18 09:14:51 +0200
committerChocobozzz <me@florianbigard.com>2021-08-18 09:14:51 +0200
commit1f6125be8b6306ba34b5ad9df985df462ef9759c (patch)
tree9894ab5a6b239f7797303c24f21e79019b942238 /server/lib/job-queue/handlers/move-to-object-storage.ts
parent9df52d660feb722404be00a50f3c8a612bec1c15 (diff)
downloadPeerTube-1f6125be8b6306ba34b5ad9df985df462ef9759c.tar.gz
PeerTube-1f6125be8b6306ba34b5ad9df985df462ef9759c.tar.zst
PeerTube-1f6125be8b6306ba34b5ad9df985df462ef9759c.zip
Optimize torrent URL update
Diffstat (limited to 'server/lib/job-queue/handlers/move-to-object-storage.ts')
-rw-r--r--server/lib/job-queue/handlers/move-to-object-storage.ts4
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'
2import { remove } from 'fs-extra' 2import { remove } from 'fs-extra'
3import { join } from 'path' 3import { join } from 'path'
4import { logger } from '@server/helpers/logger' 4import { logger } from '@server/helpers/logger'
5import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' 5import { updateTorrentUrls } from '@server/helpers/webtorrent'
6import { CONFIG } from '@server/initializers/config' 6import { CONFIG } from '@server/initializers/config'
7import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' 7import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage'
8import { getHLSDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' 8import { 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)