refactor(db): isolate test hooks and clean up workflow worker options

This commit is contained in:
yiling
2026-06-02 18:48:54 +08:00
parent c110d67d80
commit e409f551cc
30 changed files with 34 additions and 39 deletions
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest'
import { prisma } from '@shumai/db'
import { setupTestDbHooks } from '@shumai/db'
import { setupTestDbHooks } from '@shumai/db/test'
import {
updateTaskStatusActivity,
updateAssetStatusActivity,
@@ -5,6 +5,10 @@ export async function getTranscodeWorkerQueueActivity(): Promise<string> {
return 'transcode_queue'
}
export async function getAgentWorkerQueueActivity(): Promise<string> {
return 'agent_queue'
}
export async function getAssetStatusActivity(params: { assetId: string }): Promise<AssetStatus | null> {
const asset = await prisma.asset.findUnique({
where: { id: params.assetId },