in src/agentmgr.js [382:411]
async completeActivation(activationId, result, duration) {
log.succeed(`Completed activation ${activationId} in ` + log.highlightColor(`${duration/1000.0} sec`));
log.verbose("Result:", result);
try {
result.$activationId = activationId;
await this.wsk.actions.invoke({
name: this.concurrency ? this.actionName : `${this.actionName}_wskdebug_completed`,
params: result,
blocking: true,
headers: {
"X-OW-EXTRA-LOGGING": "on"
}
});
} catch (e) {
// look for special error codes from agent
const errorCode = getActivationError(e).code;
// 42 => retry
if (errorCode === 42) {
// do nothing
} else if (errorCode === 43) {
// 43 => graceful shutdown (for unit tests)
log.log("Graceful shutdown requested by agent (only for unit tests)");
return false;
} else {
log.error("Unexpected error while completing activation:", e);
}
}
return true;
}