refactor(shared): unified queue handling (#4691)
* feat(shared): unified queue initialization in shared * feat(queues): use the new queue creation everywhere * chore(shared): move to redis module * chore(shared): fix export maps * chore(fileimport): add deps properly * fix(shared): import fix * fix(everything): moear imports * fix(server): cjs imports
This commit is contained in:
@@ -18,7 +18,7 @@ const command: CommandModule = {
|
||||
})
|
||||
},
|
||||
handler: async (argv) => {
|
||||
initializeQueue()
|
||||
await initializeQueue()
|
||||
const numberOfDays = argv.days as number
|
||||
const end = new Date()
|
||||
const start = new Date(end.getTime())
|
||||
|
||||
@@ -26,11 +26,11 @@ const command: CommandModule<unknown, { testQueueId: string }> = {
|
||||
const testQueueId = argv.testQueueId
|
||||
|
||||
cliLogger.info('Initializing bull queues...')
|
||||
const queues = [buildNotificationsQueue(NOTIFICATIONS_QUEUE)]
|
||||
const queues = [await buildNotificationsQueue(NOTIFICATIONS_QUEUE)]
|
||||
|
||||
if (testQueueId) {
|
||||
cliLogger.info('Also initializing queue %s...', testQueueId)
|
||||
queues.push(buildNotificationsQueue(testQueueId))
|
||||
queues.push(await buildNotificationsQueue(testQueueId))
|
||||
}
|
||||
|
||||
cliLogger.info('Initializing monitor...')
|
||||
|
||||
@@ -24,7 +24,7 @@ const command: CommandModule = {
|
||||
})
|
||||
},
|
||||
handler: async (argv) => {
|
||||
initializeQueue()
|
||||
await initializeQueue()
|
||||
|
||||
// we don't want to submit a real mentions payload, this is for testing only
|
||||
await publishNotification(NotificationType.MentionedInComment, {
|
||||
|
||||
Reference in New Issue
Block a user