chore: Add explanations to early exit conditions of global variable
Co-authored-by: Ali BARIN <ali.barin53@gmail.com>
This commit is contained in:
@@ -73,16 +73,17 @@ const globalVariable = async (
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
pushTriggerItem: (triggerItem: ITriggerItem) => {
|
pushTriggerItem: (triggerItem: ITriggerItem) => {
|
||||||
|
if (isAlreadyProcessed(triggerItem.meta.internalId) && !$.execution.testRun) {
|
||||||
|
// early exit as we do not want to process duplicate items in actual executions
|
||||||
|
throw new EarlyExitError();
|
||||||
|
}
|
||||||
|
|
||||||
|
$.triggerOutput.data.push(triggerItem);
|
||||||
|
|
||||||
if ($.execution.testRun) {
|
if ($.execution.testRun) {
|
||||||
$.triggerOutput.data.push(triggerItem);
|
// early exit after receiving one item as it is enough for test execution
|
||||||
throw new EarlyExitError();
|
throw new EarlyExitError();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAlreadyProcessed(triggerItem.meta.internalId)) {
|
|
||||||
throw new EarlyExitError();
|
|
||||||
}
|
|
||||||
|
|
||||||
$.triggerOutput.data.push(triggerItem);
|
|
||||||
},
|
},
|
||||||
setActionItem: (actionItem: IActionItem) => {
|
setActionItem: (actionItem: IActionItem) => {
|
||||||
$.actionOutput.data = actionItem;
|
$.actionOutput.data = actionItem;
|
||||||
|
Reference in New Issue
Block a user