mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 17:29:14 +00:00
misc: always initialize pg-boss
This commit is contained in:
@@ -52,7 +52,6 @@ export const auditLogQueueServiceFactory = async ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (appCfg.USE_PG_QUEUE) {
|
|
||||||
await queueService.startPg<QueueName.AuditLog>(
|
await queueService.startPg<QueueName.AuditLog>(
|
||||||
QueueJobs.AuditLog,
|
QueueJobs.AuditLog,
|
||||||
async ([job]) => {
|
async ([job]) => {
|
||||||
@@ -143,7 +142,6 @@ export const auditLogQueueServiceFactory = async ({
|
|||||||
pollingIntervalSeconds: 0.5
|
pollingIntervalSeconds: 0.5
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
queueService.start(QueueName.AuditLog, async (job) => {
|
queueService.start(QueueName.AuditLog, async (job) => {
|
||||||
const { actor, event, ipAddress, projectId, userAgent, userAgentType } = job.data;
|
const { actor, event, ipAddress, projectId, userAgent, userAgentType } = job.data;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
TScanFullRepoEventPayload,
|
TScanFullRepoEventPayload,
|
||||||
TScanPushEventPayload
|
TScanPushEventPayload
|
||||||
} from "@app/ee/services/secret-scanning/secret-scanning-queue/secret-scanning-queue-types";
|
} from "@app/ee/services/secret-scanning/secret-scanning-queue/secret-scanning-queue-types";
|
||||||
import { getConfig } from "@app/lib/config/env";
|
|
||||||
import { logger } from "@app/lib/logger";
|
import { logger } from "@app/lib/logger";
|
||||||
import {
|
import {
|
||||||
TFailedIntegrationSyncEmailsPayload,
|
TFailedIntegrationSyncEmailsPayload,
|
||||||
@@ -209,15 +208,11 @@ export const queueServiceFactory = (redisUrl: string, dbConnectionUrl: string) =
|
|||||||
>;
|
>;
|
||||||
|
|
||||||
const initialize = async () => {
|
const initialize = async () => {
|
||||||
const appCfg = getConfig();
|
|
||||||
if (appCfg.USE_PG_QUEUE) {
|
|
||||||
logger.info("Initializing PG queue...");
|
|
||||||
await pgBoss.start();
|
await pgBoss.start();
|
||||||
|
|
||||||
pgBoss.on("error", (error) => {
|
pgBoss.on("error", (error) => {
|
||||||
logger.error(error, "pg-queue error");
|
logger.error(error, "pg-queue error");
|
||||||
});
|
});
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const start = <T extends QueueName>(
|
const start = <T extends QueueName>(
|
||||||
|
|||||||
Reference in New Issue
Block a user