feat: record api categorize data by action type
This commit is contained in:
@@ -586,6 +586,12 @@ async function executeRun(id: string, userId: string) {
|
|||||||
const binaryOutputService = new BinaryOutputService('maxun-run-screenshots');
|
const binaryOutputService = new BinaryOutputService('maxun-run-screenshots');
|
||||||
const uploadedBinaryOutput = await binaryOutputService.uploadAndStoreBinaryOutput(run, interpretationInfo.binaryOutput);
|
const uploadedBinaryOutput = await binaryOutputService.uploadAndStoreBinaryOutput(run, interpretationInfo.binaryOutput);
|
||||||
|
|
||||||
|
const categorizedOutput = {
|
||||||
|
scrapeSchema: interpretationInfo.scrapeSchemaOutput || {},
|
||||||
|
scrapeList: interpretationInfo.scrapeListOutput || {},
|
||||||
|
other: interpretationInfo.otherOutput || {}
|
||||||
|
};
|
||||||
|
|
||||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||||
|
|
||||||
const updatedRun = await run.update({
|
const updatedRun = await run.update({
|
||||||
@@ -594,7 +600,11 @@ async function executeRun(id: string, userId: string) {
|
|||||||
finishedAt: new Date().toLocaleString(),
|
finishedAt: new Date().toLocaleString(),
|
||||||
browserId: plainRun.browserId,
|
browserId: plainRun.browserId,
|
||||||
log: interpretationInfo.log.join('\n'),
|
log: interpretationInfo.log.join('\n'),
|
||||||
serializableOutput: interpretationInfo.serializableOutput,
|
serializableOutput: {
|
||||||
|
scrapeSchema: Object.values(categorizedOutput.scrapeSchema),
|
||||||
|
scrapeList: Object.values(categorizedOutput.scrapeList),
|
||||||
|
other: Object.values(categorizedOutput.other),
|
||||||
|
},
|
||||||
binaryOutput: uploadedBinaryOutput,
|
binaryOutput: uploadedBinaryOutput,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user