fix: harden real backend workflows and channel connections

This commit is contained in:
hectorzhao
2026-07-06 17:54:53 +08:00
parent 8cca361441
commit b5132d7f4e
47 changed files with 2530 additions and 314 deletions
+5 -3
View File
@@ -147,10 +147,11 @@ async function ensureSmokeData() {
}
await prisma.cmppConnectionState.upsert({
where: { channelId_connectionId: { channelId: channel.id, connectionId: 'smoke-conn-1' } },
where: { applicationId_channelId_connectionId: { applicationId: application.id, channelId: channel.id, connectionId: 'smoke-conn-1' } },
update: {
tenantId: tenant.id,
status: 'online',
applicationId: application.id,
status: 'connected',
desiredConnections: 1,
currentConnections: 1,
lastHeartbeatAt: new Date(),
@@ -158,9 +159,10 @@ async function ensureSmokeData() {
},
create: {
tenantId: tenant.id,
applicationId: application.id,
channelId: channel.id,
connectionId: 'smoke-conn-1',
status: 'online',
status: 'connected',
desiredConnections: 1,
currentConnections: 1,
lastConnectedAt: new Date(),