perf: batch gateway submits and isolate callbacks
This commit is contained in:
@@ -79,7 +79,11 @@ export class SendChainService implements OnModuleInit, OnModuleDestroy {
|
||||
|
||||
onModuleInit() {
|
||||
const processRole = process.env.CMPP_PROCESS_ROLE?.trim() || 'all';
|
||||
if (processRole === 'api') return;
|
||||
if (processRole === 'api' || processRole === 'callback') return;
|
||||
if (processRole === 'outbox') {
|
||||
this.submission.startSubmitOutboxPublisher();
|
||||
return;
|
||||
}
|
||||
if (process.env.API_ENABLE_SEND_WORKER === 'true') {
|
||||
this.startWorker();
|
||||
}
|
||||
@@ -701,8 +705,8 @@ export class SendChainService implements OnModuleInit, OnModuleDestroy {
|
||||
return this.submission.selectChannelForMessage(message, options);
|
||||
}
|
||||
|
||||
private async findApplicationRoute(tenantId: string, applicationId: string | undefined, carrier: string) {
|
||||
return this.submission.findApplicationRoute(tenantId, applicationId, carrier);
|
||||
private async findApplicationRoute(tenantId: string, applicationId: string | undefined, carrier: string, signatureId?: string) {
|
||||
return this.submission.findApplicationRoute(tenantId, applicationId, carrier, signatureId);
|
||||
}
|
||||
|
||||
private async identifyCarrier(phoneNumber: string) {
|
||||
@@ -836,8 +840,8 @@ export class SendChainService implements OnModuleInit, OnModuleDestroy {
|
||||
return this.submission.waitForChannelRateLimit(channelId, tps);
|
||||
}
|
||||
|
||||
private async refreshTaskProgress(batchTaskId: string) {
|
||||
return this.submission.refreshTaskProgress(batchTaskId);
|
||||
private async refreshTaskProgress(batchTaskId: string, knownSingleMessageStatus?: string) {
|
||||
return this.submission.refreshTaskProgress(batchTaskId, knownSingleMessageStatus);
|
||||
}
|
||||
|
||||
private smsMessageSegmentAuditDelegate() {
|
||||
|
||||
Reference in New Issue
Block a user