perf(cmpp): reduce inbound database round trips

This commit is contained in:
hectorzhao
2026-08-20 15:29:45 +08:00
parent 67b760a599
commit 14f993c1f8
12 changed files with 153 additions and 24 deletions
+4 -3
View File
@@ -352,8 +352,8 @@ export class SendChainService implements OnModuleInit, OnModuleDestroy {
return this.submission.confirmImport(data);
}
async enqueueBatchTask(taskId: string) {
return this.submission.enqueueBatchTask(taskId);
async enqueueBatchTask(taskId: string, preparedMessage?: { messageRecordId: string; queuePriority?: string | null }) {
return this.submission.enqueueBatchTask(taskId, preparedMessage);
}
async cancelBatchTask(taskId: string, tenantId?: string, sourceType = 'client') {
@@ -599,10 +599,11 @@ export class SendChainService implements OnModuleInit, OnModuleDestroy {
data: GatewayInboundSubmitDto & { phoneNumber: string },
messageId: string,
submitGroupMessageId: string,
application: NonNullable<Awaited<ReturnType<SendChainService['findInboundApplication']>>>,
synchronousRejection?: { code: string; reason: string },
receiptRejection?: { code: string; reason: string },
) {
return this.submission.submitInboundSingleMessage(data, messageId, submitGroupMessageId, synchronousRejection, receiptRejection);
return this.submission.submitInboundSingleMessage(data, messageId, submitGroupMessageId, application, synchronousRejection, receiptRejection);
}
/**