misc: use pg queue for audit logs when enabled

This commit is contained in:
Sheen Capadngan
2024-12-04 22:22:34 +08:00
parent 16a9f8c194
commit a63191e11d
7 changed files with 228 additions and 44 deletions
+8 -1
View File
@@ -55,7 +55,14 @@ const run = async () => {
}
const smtp = smtpServiceFactory(formatSmtpConfig());
const queue = queueServiceFactory(appCfg.REDIS_URL);
const queue = queueServiceFactory(appCfg.REDIS_URL, appCfg.DB_CONNECTION_URI);
if (appCfg.USE_PG_QUEUE) {
logger.info("Initializing PG queue...");
await queue.initialize();
}
const keyStore = keyStoreFactory(appCfg.REDIS_URL);
const hsmModule = initializeHsmModule();