Solucionado cierrre de pool para test

This commit is contained in:
2026-04-08 14:47:57 +02:00
parent a27e4b30d2
commit a9589f578b
4 changed files with 9 additions and 6 deletions

View File

@@ -191,6 +191,8 @@ export class OrderRepository {
const orderId = currentOrderResult.data?.id
if (orderId == undefined) {
await client.query("ROLLBACK")
client.release()
return {
error: "El order a actualizar no existe " + idType + ": " + idValue
}
@@ -261,7 +263,6 @@ export class OrderRepository {
return updatedOrder
}
public async finishOrder(args: FinishOrderDTO) {
const client = await this.pgClient.connect();
assert((args.id != undefined) != (args.correlation_id != undefined))
@@ -281,6 +282,8 @@ export class OrderRepository {
const orderId = currentOrderResult.data?.id
if (orderId == undefined) {
await client.query("ROLLBACK")
client.release()
return {
error: "El order a actualizar no existe " + idType + ": " + idValue
}