in agent/agent-concurrency.js [106:137]
async function doMain(args) {
console.log("hostname:", os.hostname());
if (args.$waitForActivation) {
// debugger connects and waits for new activations
console.log("debugger connected, waiting for activation");
return waitForActivation();
} else if (args.$activationId) {
// debugger pushes result of completed activation
console.log("completing activation", args.$activationId);
return complete(args);
} else {
// normal activation: make activation available to debugger
console.log("activation");
if (hit(args, args.$condition)) {
console.log("passing on to debugger");
return waitForCompletion( newActivation(args) );
} else {
console.log("condition evaluated to false, executing original action");
return openwhisk().actions.invoke({
name: `${process.env.__OW_ACTION_NAME}_wskdebug_original`,
params: args,
blocking: true,
result: true
});
}
}
}