Skip to content

Commit

Permalink
Propagate OpenWhisk configuration to subcompositions (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
tardieu authored and reggeenr committed Mar 12, 2021
1 parent ba07fea commit ff01897
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conductor.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function main (composition) {
const params = it(saved, item) // obtain combinator-specific params for branch invocation
params.$composer.stack = stack
params.$composer.redis = p.s.redis
params.$composer.openwhisk = p.s.openwhisk
params.$composer.join = { barrierId, position, count: array.length }
return wsk.actions.invoke({ name: process.env.__OW_ACTION_NAME, params }) // invoke branch
.then(({ activationId }) => { console.log(`barrierId: ${barrierId}, spawned position: ${position} with activationId: ${activationId}`) })
Expand Down Expand Up @@ -248,7 +249,7 @@ function main (composition) {
},

async ({ p, node, index, inspect, step }) {
p.params.$composer = { state: p.s.state, stack: [{ marker: true }].concat(p.s.stack), redis: p.s.redis }
p.params.$composer = { state: p.s.state, stack: [{ marker: true }].concat(p.s.stack), redis: p.s.redis, openwhisk: p.s.openwhisk }
p.s.state = index + node.return
if (!wsk) wsk = openwhisk(p.s.openwhisk)
return wsk.actions.invoke({ name: process.env.__OW_ACTION_NAME, params: p.params })
Expand Down

0 comments on commit ff01897

Please sign in to comment.