Skip to content

Commit

Permalink
Only require redis in conductor code when running parallel constructs (
Browse files Browse the repository at this point in the history
  • Loading branch information
tardieu authored and dgrove-oss committed Nov 13, 2019
1 parent 4b7b9f7 commit 3915dbd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions conductor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand Down

0 comments on commit 3915dbd

Please sign in to comment.