Solucionado cierrre de pool para test
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user