mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 12:56:29 +00:00
Merge pull request #4773 from Infisical/revert-4760-misc/added-health-and-ready-probe-endpoints
Revert "misc: added health and ready probe endpoints"
This commit is contained in:
@@ -10,7 +10,6 @@ type TNotificationQueueServiceFactoryDep = {
|
||||
|
||||
export type TNotificationQueueServiceFactory = {
|
||||
pushUserNotifications: (data: TCreateUserNotificationDTO[]) => Promise<void>;
|
||||
init: () => Promise<void>;
|
||||
};
|
||||
|
||||
export const notificationQueueServiceFactory = async ({
|
||||
@@ -21,23 +20,20 @@ export const notificationQueueServiceFactory = async ({
|
||||
await queueService.queuePg(QueueJobs.UserNotification, { notifications: data });
|
||||
};
|
||||
|
||||
const init = async () => {
|
||||
await queueService.startPg(
|
||||
QueueJobs.UserNotification,
|
||||
async ([job]) => {
|
||||
const { notifications } = job.data as { notifications: TCreateUserNotificationDTO[] };
|
||||
await userNotificationDAL.batchInsert(notifications);
|
||||
},
|
||||
{
|
||||
batchSize: 1,
|
||||
workerCount: 2,
|
||||
pollingIntervalSeconds: 1
|
||||
}
|
||||
);
|
||||
};
|
||||
await queueService.startPg(
|
||||
QueueJobs.UserNotification,
|
||||
async ([job]) => {
|
||||
const { notifications } = job.data as { notifications: TCreateUserNotificationDTO[] };
|
||||
await userNotificationDAL.batchInsert(notifications);
|
||||
},
|
||||
{
|
||||
batchSize: 1,
|
||||
workerCount: 2,
|
||||
pollingIntervalSeconds: 1
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
pushUserNotifications,
|
||||
init
|
||||
pushUserNotifications
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user