// 触发 book 77/78 音频 + 查 TtsTask const p = new (require('@prisma/client').PrismaClient)(); (async () => { const { bookStore } = require('./dist/modules/book-generator/book-generator.store.js'); for (const bookId of [77, 78]) { const chs = await p.bookChapter.findMany({ where: { bookId } }); console.log('=== book', bookId, '-', chs.length, '章 ==='); for (const ch of chs) { try { await bookStore.generateChapterAudioById(ch.id, 1, undefined, {}); console.log(' queued ch#' + ch.id); } catch (e) { console.log(' err ch#' + ch.id + ': ' + e.message.slice(0, 200)); } } } await p.$disconnect(); })();