Add more logs when storing master playlist in s3

pull/5817/head
Chocobozzz 2023-05-25 09:58:08 +02:00
parent 51afea5411
commit a60b100601
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 7 deletions

View File

@ -8,12 +8,7 @@ import { computeOutputFPS } from '@server/helpers/ffmpeg'
import { logger, loggerTagsFactory, LoggerTagsFn } from '@server/helpers/logger' import { logger, loggerTagsFactory, LoggerTagsFn } from '@server/helpers/logger'
import { CONFIG } from '@server/initializers/config' import { CONFIG } from '@server/initializers/config'
import { MEMOIZE_TTL, P2P_MEDIA_LOADER_PEER_VERSION, VIDEO_LIVE } from '@server/initializers/constants' import { MEMOIZE_TTL, P2P_MEDIA_LOADER_PEER_VERSION, VIDEO_LIVE } from '@server/initializers/constants'
import { import { removeHLSFileObjectStorageByPath, storeHLSFileFromContent, storeHLSFileFromPath } from '@server/lib/object-storage'
removeHLSFileObjectStorageByPath,
storeHLSFileFromContent,
storeHLSFileFromFilename,
storeHLSFileFromPath
} from '@server/lib/object-storage'
import { VideoFileModel } from '@server/models/video/video-file' import { VideoFileModel } from '@server/models/video/video-file'
import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models' import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '@server/types/models'
@ -190,7 +185,10 @@ class MuxingSession extends EventEmitter {
try { try {
if (this.streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) { if (this.streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) {
const url = await storeHLSFileFromFilename(this.streamingPlaylist, this.streamingPlaylist.playlistFilename) const masterContent = await readFile(path, 'utf-8')
logger.debug('Uploading live master playlist on object storage for %s', this.videoUUID, { masterContent, ...this.lTags() })
const url = await storeHLSFileFromContent(this.streamingPlaylist, this.streamingPlaylist.playlistFilename, masterContent)
this.streamingPlaylist.playlistUrl = url this.streamingPlaylist.playlistUrl = url
} }