refactor: analysis workflow architecture
fix: NEXTAUTH_URL fix: prevent project model edits from affecting default model
This commit is contained in:
@@ -122,7 +122,30 @@ describe('chain contract - text queue behavior', () => {
|
||||
expect(calls).toHaveLength(1)
|
||||
expect(calls[0]).toEqual(expect.objectContaining({
|
||||
jobName: TASK_TYPE.SCRIPT_TO_STORYBOARD_RUN,
|
||||
options: expect.objectContaining({ jobId: 'task-text-1', priority: 0 }),
|
||||
options: expect.objectContaining({ jobId: 'task-text-1', priority: 0, attempts: 1 }),
|
||||
}))
|
||||
})
|
||||
|
||||
it('forces single queue attempt for core analysis workflows', async () => {
|
||||
const { addTaskJob, QUEUE_NAME } = await import('@/lib/task/queues')
|
||||
|
||||
await addTaskJob({
|
||||
taskId: 'task-text-story-1',
|
||||
type: TASK_TYPE.STORY_TO_SCRIPT_RUN,
|
||||
locale: 'zh',
|
||||
projectId: 'project-1',
|
||||
episodeId: 'episode-1',
|
||||
targetType: 'NovelPromotionEpisode',
|
||||
targetId: 'episode-1',
|
||||
payload: { episodeId: 'episode-1' },
|
||||
userId: 'user-1',
|
||||
}, { attempts: 5 })
|
||||
|
||||
const calls = queueState.addCallsByQueue.get(QUEUE_NAME.TEXT) || []
|
||||
expect(calls).toHaveLength(1)
|
||||
expect(calls[0]?.options).toEqual(expect.objectContaining({
|
||||
jobId: 'task-text-story-1',
|
||||
attempts: 1,
|
||||
}))
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user