This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

semble / src / shared / infrastructure / events / QueueConfig.ts
1.2 kB 47 lines
1export const QueueNames = { 2 FEEDS: 'feeds', 3 SEARCH: 'search', 4 ANALYTICS: 'analytics', 5 NOTIFICATIONS: 'notifications', 6 SYNC: 'sync', 7} as const; 8 9export type QueueName = (typeof QueueNames)[keyof typeof QueueNames]; 10 11export const QueueOptions = { 12 [QueueNames.FEEDS]: { 13 attempts: 3, 14 backoff: { type: 'exponential' as const, delay: 2000 }, 15 removeOnComplete: 50, 16 removeOnFail: 25, 17 concurrency: 15, 18 }, 19 [QueueNames.SEARCH]: { 20 attempts: 3, 21 backoff: { type: 'exponential' as const, delay: 2000 }, 22 removeOnComplete: 50, 23 removeOnFail: 25, 24 concurrency: 10, 25 }, 26 [QueueNames.ANALYTICS]: { 27 attempts: 2, 28 backoff: { type: 'exponential' as const, delay: 5000 }, 29 removeOnComplete: 25, 30 removeOnFail: 10, 31 concurrency: 20, 32 }, 33 [QueueNames.NOTIFICATIONS]: { 34 attempts: 3, 35 backoff: { type: 'exponential' as const, delay: 2000 }, 36 removeOnComplete: 50, 37 removeOnFail: 25, 38 concurrency: 10, 39 }, 40 [QueueNames.SYNC]: { 41 attempts: 3, 42 backoff: { type: 'exponential' as const, delay: 3000 }, 43 removeOnComplete: 50, 44 removeOnFail: 25, 45 concurrency: 5, // Lower concurrency for sync operations to avoid rate limits 46 }, 47} as const;