feat: rm other actions logic

This commit is contained in:
Rohit
2025-04-30 19:24:38 +05:30
parent c7e3a66511
commit f1d0cbdaae
13 changed files with 9 additions and 200 deletions

View File

@@ -14,7 +14,6 @@ interface AirtableUpdateTask {
interface SerializableOutput {
scrapeSchema?: any[];
scrapeList?: any[];
other?: any[];
}
const MAX_RETRIES = 3;
@@ -52,7 +51,6 @@ function mergeRelatedData(serializableOutput: SerializableOutput, binaryOutput:
...[
...(serializableOutput.scrapeSchema ?? []).map(arr => arr?.length ?? 0),
...(serializableOutput.scrapeList ?? []).map(arr => arr?.length ?? 0),
...(serializableOutput.other ?? []).map(arr => arr?.length ?? 0),
0
]
);
@@ -83,17 +81,6 @@ function mergeRelatedData(serializableOutput: SerializableOutput, binaryOutput:
}
}
if (serializableOutput.other) {
for (const otherArray of serializableOutput.other) {
if (!Array.isArray(otherArray)) continue;
for (let i = 0; i < otherArray.length; i++) {
if (i >= mergedRecords.length) break;
mergedRecords[i] = { ...mergedRecords[i], ...otherArray[i] };
}
}
}
if (binaryOutput && Object.keys(binaryOutput).length > 0) {
for (let i = 0; i < mergedRecords.length; i++) {
const screenshotKey = `item-${i}`;

View File

@@ -13,7 +13,6 @@ interface GoogleSheetUpdateTask {
interface SerializableOutput {
scrapeSchema?: any[];
scrapeList?: any[];
other?: any[];
}
const MAX_RETRIES = 5;
@@ -69,16 +68,6 @@ export async function updateGoogleSheet(robotId: string, runId: string) {
plainRobot
);
}
if (serializableOutput.other && serializableOutput.other.length > 0) {
await processOutputType(
robotId,
spreadsheetId,
'Other',
serializableOutput.other,
plainRobot
);
}
}
if (plainRun.binaryOutput && Object.keys(plainRun.binaryOutput).length > 0) {