Arreglo de bugs ordes
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"test": "vitest watch",
|
||||
"build": "yarn workspaces foreach -A run build && cp .env dist/ && yarn setup:runtime",
|
||||
"build": "rm -rf ./dist && yarn workspaces foreach -Api run build && cp .env dist/ && yarn setup:runtime",
|
||||
"setup:runtime": "mkdir -p dist/packages/node_modules && ln -sf ../sim-shared dist/packages/node_modules/sim-shared && ln -sf ../sf-consumidor-objenious dist/packages/node_modules/sim-consumidor-objenious",
|
||||
"start": "yarn setup:runtime && yarn workspaces foreach -Apiv --exclude sim-objenious-cron run start",
|
||||
"typecheck": "npx tsc --noEmit",
|
||||
|
||||
@@ -50,6 +50,7 @@ export class SimNosUsecases {
|
||||
status: "failed",
|
||||
correlation_id: correlation_id,
|
||||
reason: reason,
|
||||
error: reason,
|
||||
stackTrace: detail
|
||||
}
|
||||
const order = await this.orderRepository.errorOrder(updateData)
|
||||
@@ -72,6 +73,7 @@ export class SimNosUsecases {
|
||||
const res = await func(args)
|
||||
|
||||
if (res.error != undefined) {
|
||||
console.log("Error peticion: ", res)
|
||||
if (correlation_id != undefined)
|
||||
this.setFailed(correlation_id, res.error).then()
|
||||
return res;
|
||||
|
||||
@@ -402,6 +402,8 @@ export class OrderRepository {
|
||||
client.query<{ id: number, status: string, update_date: string }>(uOrderTracking, vOrderTracking)
|
||||
)
|
||||
|
||||
console.log("updatedOrderResult", updatedOrderResult)
|
||||
|
||||
if (updatedOrderResult.error != undefined) {
|
||||
await client.query("ROLLBACK")
|
||||
client.release()
|
||||
|
||||
Reference in New Issue
Block a user