in src/agentmgr.js [504:536]
async pushAgent(action, agentCode, backupName) {
// overwrite action with agent
// this is to support older openwhisks for which nodejs:default is less than version 8
const nodejs8 = await this.openwhiskSupports("nodejs8");
if (this.shuttingDown) {
// race condition on shutdown during startup due to errors
return;
}
await this.wsk.actions.update({
name: this.actionName,
action: {
exec: {
kind: nodejs8 ? "nodejs:default" : "blackbox",
image: nodejs8 ? undefined : "openwhisk/action-nodejs-v8",
code: agentCode
},
limits: {
timeout: (this.argv.agentTimeout || 300) * 1000,
concurrency: this.concurrency ? 200: 1
},
annotations: [
...action.annotations,
{ key: "provide-api-key", value: true },
{ key: "wskdebug", value: true },
{ key: "description", value: `wskdebug agent. temporarily installed over original action. original action backup at ${backupName}.` }
],
parameters: action.parameters || []
}
});
}