feat: use run.dataValues
This commit is contained in:
@@ -326,7 +326,7 @@ async function executeRun(id: string) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let totalRowsExtracted = 0;
|
let totalRowsExtracted = 0;
|
||||||
updatedRun.serializableOutput['item-0'].forEach((item: any) => {
|
updatedRun.dataValues.serializableOutput['item-0'].forEach((item: any) => {
|
||||||
totalRowsExtracted += Object.keys(item).length;
|
totalRowsExtracted += Object.keys(item).length;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -338,9 +338,9 @@ async function executeRun(id: string) {
|
|||||||
runId: id,
|
runId: id,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
status: 'success',
|
status: 'success',
|
||||||
extractedItemsCount: updatedRun.serializableOutput['item-0'].length,
|
extractedItemsCount: updatedRun.dataValues.serializableOutput['item-0'].length,
|
||||||
extractedRowsCount: totalRowsExtracted,
|
extractedRowsCount: totalRowsExtracted,
|
||||||
extractedScreenshotsCount: updatedRun.binaryOutput['item-0'].length,
|
extractedScreenshotsCount: updatedRun.dataValues.binaryOutput['item-0'].length,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ router.post('/runs/run/:id', requireSignIn, async (req: AuthenticatedRequest, re
|
|||||||
});
|
});
|
||||||
|
|
||||||
let totalRowsExtracted = 0;
|
let totalRowsExtracted = 0;
|
||||||
run.serializableOutput['item-0'].forEach((item: any) => {
|
run.dataValues.serializableOutput['item-0'].forEach((item: any) => {
|
||||||
totalRowsExtracted += Object.keys(item).length;
|
totalRowsExtracted += Object.keys(item).length;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -268,9 +268,9 @@ router.post('/runs/run/:id', requireSignIn, async (req: AuthenticatedRequest, re
|
|||||||
user_id: req.user?.id,
|
user_id: req.user?.id,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
status: 'success',
|
status: 'success',
|
||||||
extractedItemsCount: run.serializableOutput['item-0'].length,
|
extractedItemsCount: run.dataValues.serializableOutput['item-0'].length,
|
||||||
extractedRowsCount: totalRowsExtracted,
|
extractedRowsCount: totalRowsExtracted,
|
||||||
extractedScreenshotsCount: run.binaryOutput['item-0'].length,
|
extractedScreenshotsCount: run.dataValues.binaryOutput['item-0'].length,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ async function executeRun(id: string) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let totalRowsExtracted = 0;
|
let totalRowsExtracted = 0;
|
||||||
run.serializableOutput['item-0'].forEach((item: any) => {
|
run.dataValues.serializableOutput['item-0'].forEach((item: any) => {
|
||||||
totalRowsExtracted += Object.keys(item).length;
|
totalRowsExtracted += Object.keys(item).length;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -146,9 +146,9 @@ async function executeRun(id: string) {
|
|||||||
runId: id,
|
runId: id,
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
status: 'success',
|
status: 'success',
|
||||||
extractedItemsCount: run.serializableOutput['item-0'].length,
|
extractedItemsCount: run.dataValues.serializableOutput['item-0'].length,
|
||||||
extractedRowsCount: totalRowsExtracted,
|
extractedRowsCount: totalRowsExtracted,
|
||||||
extractedScreenshotsCount: run.binaryOutput['item-0'].length,
|
extractedScreenshotsCount: run.dataValues.binaryOutput['item-0'].length,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user