we don't want to create thumbnail for imported pages

This commit is contained in:
Hongbo Wu
2023-08-17 18:05:51 +08:00
parent 0609043956
commit ec88a9fe8e

View File

@ -186,11 +186,14 @@ export const savePage = async (
}
// create a task to update thumbnail and pre-cache all images
try {
const taskId = await enqueueThumbnailTask(saver.userId, slug)
logger.info('Created thumbnail task', { taskId })
} catch (e) {
logger.error('Failed to create thumbnail task', e)
if (input.source !== 'csv-importer') {
// we don't want to create thumbnail for imported pages
try {
const taskId = await enqueueThumbnailTask(saver.userId, slug)
logger.info('Created thumbnail task', { taskId })
} catch (e) {
logger.error('Failed to create thumbnail task', e)
}
}
if (parseResult.highlightData) {