Enqueue text to speech task after creating article
This commit is contained in:
@ -94,6 +94,7 @@ import {
|
||||
updatePage,
|
||||
} from '../../elastic/pages'
|
||||
import { searchHighlights } from '../../elastic/highlights'
|
||||
import { enqueueTextToSpeech } from '../../utils/createTask'
|
||||
|
||||
export type PartialArticle = Omit<
|
||||
Article,
|
||||
@ -372,6 +373,10 @@ export const createArticleResolver = authorized<
|
||||
articleToSave.id = newPageId
|
||||
}
|
||||
|
||||
// enqueue a task to convert text to speech
|
||||
const taskName = await enqueueTextToSpeech(uid, articleToSave.id)
|
||||
log.info('Text to speech task name', { taskName })
|
||||
|
||||
log.info(
|
||||
'page created in elastic',
|
||||
articleToSave.id,
|
||||
|
||||
Reference in New Issue
Block a user