Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed Nov 16, 2024
1 parent de366c2 commit ae6eeb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
21 changes: 10 additions & 11 deletions src/api/notifications/notifications.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ enum NotificationDispatchStatusField {
@ApiTags('notification')
@Roles(Role.Admin, Role.SuperAdmin, Role.AuthenticatedUser)
export class NotificationsController {
readonly appConfig;
readonly handleBounce;
readonly guaranteedBroadcastPushDispatchProcessing;
readonly broadcastSubscriberChunkSize;
readonly logSkippedBroadcastPushDispatches;
readonly inboundSmtpServerDomain;
readonly handleListUnsubscribeByEmail;
private readonly appConfig;
private readonly handleBounce;
private readonly guaranteedBroadcastPushDispatchProcessing;
private readonly broadcastSubscriberChunkSize;
private readonly logSkippedBroadcastPushDispatches;
private readonly inboundSmtpServerDomain;
private readonly handleListUnsubscribeByEmail;

constructor(
private readonly notificationsService: NotificationsService,
private readonly subscriptionsService: SubscriptionsService,
readonly appConfigService: AppConfigService,
readonly configurationsService: ConfigurationsService,
private readonly appConfigService: AppConfigService,
private readonly configurationsService: ConfigurationsService,
private readonly bouncesService: BouncesService,
private readonly commonService: CommonService,
@Inject(REQUEST) private readonly req: Request & { user: UserProfile },
Expand All @@ -105,8 +105,6 @@ export class NotificationsController {
this.handleBounce = this.appConfig.email?.bounce?.enabled;
this.guaranteedBroadcastPushDispatchProcessing =
this.appConfig.notification?.guaranteedBroadcastPushDispatchProcessing;
const ft = this.appConfig.notification?.broadcastCustomFilterFunctions;

this.broadcastSubscriberChunkSize =
this.appConfig.notification?.broadcastSubscriberChunkSize;
this.logSkippedBroadcastPushDispatches =
Expand All @@ -116,6 +114,7 @@ export class NotificationsController {
this.handleListUnsubscribeByEmail =
this.appConfig.email?.listUnsubscribeByEmail?.enabled;

const ft = this.appConfig.notification?.broadcastCustomFilterFunctions;
if (ft) {
this.jmespathSearchOpts.functionTable = ft;
}
Expand Down
8 changes: 4 additions & 4 deletions src/common/common.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ export class CommonService {
const queuedID = [];
// IMPORTANT: place queueEvents.on before myQueue.add
queueEvents.on('completed', async ({ jobId }) => {
Logger.debug(
`job ${jobId} completed on queueEventsListener for ${j?.id}`,
CommonService.name,
);
if (!j?.id) {
queuedID.push(jobId);
return;
}
if (jobId !== j?.id) {
return;
}
Logger.debug(
`job ${jobId} completed on queueEventsListener for ${j?.id}`,
CommonService.name,
);
try {
resolve(await fn.apply(this, args));
} catch (ex) {
Expand Down

0 comments on commit ae6eeb0

Please sign in to comment.