feat(worker): add index queue and wire Meilisearch indexing after approval

Adds index.queue.ts and index.processor.ts to handle BullMQ indexing jobs,
updates main.ts to create a Meilisearch client, configure the index on startup,
and enqueue index + forward jobs from ApprovalResult after a star reaction.
This commit is contained in:
2026-05-28 00:02:47 +05:30
parent 7d905b166e
commit 1e421c0073
6 changed files with 167 additions and 52 deletions
+7
View File
@@ -0,0 +1,7 @@
import { Queue } from 'bullmq';
import { IndexJobData } from '@tower/types';
import { parseRedisUrl } from './redis-connection';
export function createIndexQueue(redisUrl: string): Queue<IndexJobData> {
return new Queue<IndexJobData>('tower-index', { connection: parseRedisUrl(redisUrl) });
}