1e421c0073
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.
8 lines
296 B
TypeScript
8 lines
296 B
TypeScript
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) });
|
|
}
|