feat: push list data at index position
This commit is contained in:
@@ -107,6 +107,11 @@ export class WorkflowInterpreter {
|
|||||||
*/
|
*/
|
||||||
public binaryData: { mimetype: string, data: string }[] = [];
|
public binaryData: { mimetype: string, data: string }[] = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Track current scrapeList index
|
||||||
|
*/
|
||||||
|
private currentScrapeListIndex: number = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of id's of the pairs from the workflow that are about to be paused.
|
* An array of id's of the pairs from the workflow that are about to be paused.
|
||||||
* As "breakpoints".
|
* As "breakpoints".
|
||||||
@@ -288,6 +293,7 @@ export class WorkflowInterpreter {
|
|||||||
scrapeList: [],
|
scrapeList: [],
|
||||||
};
|
};
|
||||||
this.binaryData = [];
|
this.binaryData = [];
|
||||||
|
this.currentScrapeListIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -322,6 +328,9 @@ export class WorkflowInterpreter {
|
|||||||
},
|
},
|
||||||
setActionType: (type: string) => {
|
setActionType: (type: string) => {
|
||||||
this.currentActionType = type;
|
this.currentActionType = type;
|
||||||
|
},
|
||||||
|
incrementScrapeListIndex: () => {
|
||||||
|
this.currentScrapeListIndex++;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
serializableCallback: (data: any) => {
|
serializableCallback: (data: any) => {
|
||||||
@@ -334,7 +343,7 @@ export class WorkflowInterpreter {
|
|||||||
this.serializableDataByType.scrapeSchema.push([data]);
|
this.serializableDataByType.scrapeSchema.push([data]);
|
||||||
}
|
}
|
||||||
} else if (this.currentActionType === 'scrapeList') {
|
} else if (this.currentActionType === 'scrapeList') {
|
||||||
this.serializableDataByType.scrapeList.push(data);
|
this.serializableDataByType.scrapeList[this.currentScrapeListIndex] = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.socket.emit('serializableCallback', data);
|
this.socket.emit('serializableCallback', data);
|
||||||
|
|||||||
Reference in New Issue
Block a user