You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dg...@apache.org on 2019/11/13 21:22:39 UTC

[openwhisk-composer] branch master updated: Only require redis in conductor code when running parallel constructs (#51)

This is an automated email from the ASF dual-hosted git repository.

dgrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-composer.git


The following commit(s) were added to refs/heads/master by this push:
     new 3915dbd  Only require redis in conductor code when running parallel constructs (#51)
3915dbd is described below

commit 3915dbd0298d8f6be92629f57bc8369fd918d910
Author: Olivier Tardieu <ta...@users.noreply.github.com>
AuthorDate: Wed Nov 13 16:22:32 2019 -0500

    Only require redis in conductor code when running parallel constructs (#51)
---
 conductor.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/conductor.js b/conductor.js
index 74c84bc..7d163b9 100644
--- a/conductor.js
+++ b/conductor.js
@@ -42,7 +42,6 @@ module.exports = { generate }
 // runtime code
 function main (composition) {
   const openwhisk = require('openwhisk')
-  const redis = require('redis')
   const uuid = require('uuid').v4
   let wsk
   let db
@@ -52,7 +51,7 @@ function main (composition) {
   function done (id) { return `composer/join/${id}` }
 
   function createRedisClient (p) {
-    const client = redis.createClient(p.s.redis.uri, p.s.redis.ca ? { tls: { ca: Buffer.from(p.s.redis.ca, 'base64').toString('binary') } } : {})
+    const client = require('redis').createClient(p.s.redis.uri, p.s.redis.ca ? { tls: { ca: Buffer.from(p.s.redis.ca, 'base64').toString('binary') } } : {})
     const noop = () => { }
     let handler = noop
     client.on('error', error => handler(error))