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 16:00:27 UTC
[openwhisk-composer] branch webpackIgnore-redis updated: Add
webpackIgnore annotation on dynamic conductor dependencies
This is an automated email from the ASF dual-hosted git repository.
tardieu pushed a commit to branch webpackIgnore-redis
in repository https://gitbox.apache.org/repos/asf/openwhisk-composer.git
The following commit(s) were added to refs/heads/webpackIgnore-redis by this push:
new 9dbbbe6 Add webpackIgnore annotation on dynamic conductor dependencies
9dbbbe6 is described below
commit 9dbbbe65002132c06a420862403da6de088843bb
Author: Olivier Tardieu <ta...@users.noreply.github.com>
AuthorDate: Mon Jan 13 11:00:01 2020 -0500
Add webpackIgnore annotation on dynamic conductor dependencies
---
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)