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:
@@ -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) });
|
||||
}
|
||||
Reference in New Issue
Block a user