()
| 49 | const QUEUE_REMOVE_COMMUNITY = 'remove-community'; |
| 50 | |
| 51 | async function runWorker() { |
| 52 | await downloadCert(); |
| 53 | const runner = await run({ |
| 54 | connectionString: getDatabaseUrl({ |
| 55 | dbUrl: process.env.DATABASE_URL, |
| 56 | cert: process.env.RDS_CERTIFICATE, |
| 57 | }), |
| 58 | concurrency: 10, |
| 59 | noHandleSignals: false, |
| 60 | pollInterval: 1000, |
| 61 | taskList: { |
| 62 | notificationEvent, |
| 63 | notificationEmailTask, |
| 64 | [QUEUE_REMIND_ME_LATER]: reminderMeLaterTask as any, |
| 65 | [QUEUE_MARK_ALL_AS_READ]: markAllAsReadTask as any, |
| 66 | [QUEUE_CLEANUP_USER_THREAD_STATUS]: cleanupUserThreadStatusTask as any, |
| 67 | [QUEUE_MAINTENANCE_MESSAGE_COUNT]: updateMessagesCount, |
| 68 | [QUEUE_CRAWL_GOOGLE_STATS]: crawlGoogleResults, |
| 69 | [QUEUE_INTEGRATION_DISCORD]: discordIntegration, |
| 70 | [QUEUE_REMOVE_COMMUNITY]: removeCommunity as any, |
| 71 | ['two-way-sync']: twoWaySync, |
| 72 | sync, |
| 73 | webhook, |
| 74 | slugify, |
| 75 | sitemap, |
| 76 | buildFeed, |
| 77 | checkPropagation, |
| 78 | typesenseSetup, |
| 79 | typesenseDeletion, |
| 80 | typesenseRefreshApiKeys, |
| 81 | typesenseOnChannelNameUpdate, |
| 82 | typesenseOnChannelTypeUpdate, |
| 83 | typesenseOnCommunityTypeUpdate, |
| 84 | typesenseOnUserNameUpdate, |
| 85 | typesenseOnChannelDeletion, |
| 86 | typesenseOnCommunityDeletion, |
| 87 | typesenseOnMessageCreation, |
| 88 | typesenseOnMessageUpdate, |
| 89 | typesenseOnThreadCreation, |
| 90 | typesenseOnThreadUpdate, |
| 91 | // llmQuestion, |
| 92 | }, |
| 93 | parsedCronItems: parseCronItems([ |
| 94 | { |
| 95 | pattern: '0 */2 * * *', // every 2 hours |
| 96 | options: { |
| 97 | queueName: 'checkPropagation', |
| 98 | backfillPeriod: 0, |
| 99 | }, |
| 100 | task: 'checkPropagation', |
| 101 | identifier: 'checkPropagation', |
| 102 | }, |
| 103 | { |
| 104 | pattern: '00 3 * * *', // every day at 03:00 |
| 105 | options: { |
| 106 | queueName: 'slugify', |
| 107 | backfillPeriod: 0, |
| 108 | }, |
no test coverage detected