You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ta...@apache.org on 2020/01/13 18:03:32 UTC

[openwhisk-composer] branch master updated: Add webpackIgnore annotation on dynamic conductor dependencies (#65)

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

tardieu 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 767971d  Add webpackIgnore annotation on dynamic conductor dependencies (#65)
767971d is described below

commit 767971d95f49f46bbe67afb2333bdc2f11101869
Author: Olivier Tardieu <ta...@users.noreply.github.com>
AuthorDate: Mon Jan 13 13:03:22 2020 -0500

    Add webpackIgnore annotation on dynamic conductor dependencies (#65)
---
 conductor.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/conductor.js b/conductor.js
index f37d152..80495d9 100644
--- a/conductor.js
+++ b/conductor.js
@@ -41,7 +41,7 @@ module.exports = { generate }
 
 // runtime code
 function main (composition) {
-  const openwhisk = require('openwhisk')
+  const openwhisk = require(/* webpackIgnore: true */ 'openwhisk')
   let wsk
   let db
   const expiration = 86400 // expire redis key after a day
@@ -50,11 +50,11 @@ function main (composition) {
   function done (id) { return `composer/join/${id}` }
 
   function createRedisClient (p) {
-    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 client = require(/* webpackIgnore: true */ '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))
-    require('redis-commands').list.forEach(f => {
+    require(/* webpackIgnore: true */ 'redis-commands').list.forEach(f => {
       client[`${f}Async`] = function () {
         let failed = false
         return new Promise((resolve, reject) => {
@@ -100,7 +100,7 @@ function main (composition) {
       return
     }
     const stack = [{ marker: true }].concat(p.s.stack)
-    const barrierId = require('uuid').v4()
+    const barrierId = require(/* webpackIgnore: true */ 'uuid').v4()
     console.log(`barrierId: ${barrierId}, spawning: ${array.length}`)
     if (!wsk) wsk = openwhisk(p.s.openwhisk)
     if (!db) db = createRedisClient(p)