fix notif
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-19 19:46:49 +03:30
parent 9fa55cc6b5
commit 096297d1d1
5 changed files with 181 additions and 26 deletions
@@ -119,6 +119,12 @@ export class NotificationQueueService {
}
async addBulkInAppNotifications(jobs: InAppNotificationQueueJob[]): Promise<void> {
try {
this.logger.log(
`[addBulkInAppNotifications] queueing ${jobs.length} job(s): ${jobs
.map(j => `admin=${j.recipient.adminId} rest=${j.recipient.restaurantId} notif=${j.notificationId}`)
.join(' | ')}`,
);
const queueJobs = jobs.map(job => ({
name: 'in-app-notification',
data: job,
@@ -132,10 +138,12 @@ export class NotificationQueueService {
},
}));
await this.inAppQueue.addBulk(queueJobs);
this.logger.log(`Added ${jobs.length} InApp notification jobs to queue`);
const added = await this.inAppQueue.addBulk(queueJobs);
this.logger.log(
`[addBulkInAppNotifications] added ${added.length} job(s) to queue "${NotificationQueueNameEnum.IN_APP}": ids=${added.map(j => j.id).join(', ')}`,
);
} catch (error) {
this.logger.error(`Failed to add bulk notifications to queue:`, error);
this.logger.error(`[addBulkInAppNotifications] failed to add jobs to queue:`, error);
throw error;
}
}