Change warn to warning

This commit is contained in:
Jackson Harper 2024-03-27 15:41:15 +08:00
parent d23a7d56c0
commit 38f959685f
2 changed files with 12 additions and 8 deletions

View file

@ -360,7 +360,7 @@ export const processYouTubeVideo = async (
const videoId = videoURL.searchParams.get('v')
if (!videoId) {
logger.warn('no video id for supplied youtube url', {
logger.warning('no video id for supplied youtube url', {
url: libraryItem.originalUrl,
})
return
@ -370,7 +370,7 @@ export const processYouTubeVideo = async (
const youtube = new YouTubeClient()
const video = await youtube.getVideo(videoId)
if (!video) {
logger.warn('no video found for youtube url', {
logger.warning('no video found for youtube url', {
url: libraryItem.originalUrl,
})
return
@ -427,11 +427,15 @@ export const processYouTubeVideo = async (
jobData.userId
)
if (!updated) {
logger.warn('could not updated library item')
logger.warning('could not updated library item')
}
}
} catch (err) {
logger.warn('error getting youtube metadata: ', { err, jobData, videoURL })
logger.warning('error getting youtube metadata: ', {
err,
jobData,
videoURL,
})
}
}
@ -470,7 +474,7 @@ export const processYouTubeTranscript = async (
const youtube = new YouTubeClient()
const video = await youtube.getVideo(jobData.videoId)
if (!video) {
logger.warn('no video found for youtube url', {
logger.warning('no video found for youtube url', {
url: libraryItem.originalUrl,
})
return
@ -517,10 +521,10 @@ export const processYouTubeTranscript = async (
jobData.userId
)
if (!updated) {
logger.warn('could not updated library item')
logger.warning('could not updated library item')
}
}
} catch (err) {
logger.warn('error getting youtube transcript: ', { err, jobData })
logger.warning('error getting youtube transcript: ', { err, jobData })
}
}

View file

@ -158,7 +158,7 @@ export const createWorker = (connection: ConnectionOptions) =>
case EXPORT_ALL_ITEMS_JOB_NAME:
return exportAllItems(job.data)
default:
logger.warn(`[queue-processor] unhandled job: ${job.name}`)
logger.warning(`[queue-processor] unhandled job: ${job.name}`)
}
},
{