Convert AI tagging to background job with progress tracking

- Add TaggingJob model for tracking tagging progress
- Convert batch tagging to background job processing (prevents timeouts)
- Add real-time progress polling in UI with percentage/count display
- Add admin notifications when tagging job completes or fails
- Export getTaggingSettings and getAvailableTags functions

After deployment, run: npx prisma migrate deploy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 11:48:57 +01:00
parent 0b86dc6477
commit 1b2311b4a3
5 changed files with 481 additions and 94 deletions

View File

@@ -94,7 +94,7 @@ Rules:
/**
* Get system settings for AI tagging
*/
async function getTaggingSettings(): Promise<{
export async function getTaggingSettings(): Promise<{
enabled: boolean
maxTags: number
}> {
@@ -125,7 +125,7 @@ async function getTaggingSettings(): Promise<{
/**
* Get all active expertise tags
*/
async function getAvailableTags(): Promise<AvailableTag[]> {
export async function getAvailableTags(): Promise<AvailableTag[]> {
return prisma.expertiseTag.findMany({
where: { isActive: true },
select: {