diff options
author | 2020-11-18 23:26:45 +0100 | |
---|---|---|
committer | 2020-11-18 23:26:45 +0100 | |
commit | 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch) | |
tree | 8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/worker-farm/lib/child | |
parent | 1870f3fdf43707a15fda0f609a021f516f45eb63 (diff) | |
download | website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2 website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip |
rm node_modules
Diffstat (limited to 'node_modules/worker-farm/lib/child')
-rw-r--r-- | node_modules/worker-farm/lib/child/index.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/node_modules/worker-farm/lib/child/index.js b/node_modules/worker-farm/lib/child/index.js deleted file mode 100644 index 78f6337..0000000 --- a/node_modules/worker-farm/lib/child/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' - -let $module - -/* - let contextProto = this.context; - while (contextProto = Object.getPrototypeOf(contextProto)) { - completionGroups.push(Object.getOwnPropertyNames(contextProto)); - } -*/ - - -function handle (data) { - let idx = data.idx - , child = data.child - , method = data.method - , args = data.args - , callback = function () { - let _args = Array.prototype.slice.call(arguments) - if (_args[0] instanceof Error) { - let e = _args[0] - _args[0] = { - '$error' : '$error' - , 'type' : e.constructor.name - , 'message' : e.message - , 'stack' : e.stack - } - Object.keys(e).forEach(function(key) { - _args[0][key] = e[key] - }) - } - process.send({ owner: 'farm', idx: idx, child: child, args: _args }) - } - , exec - - if (method == null && typeof $module == 'function') - exec = $module - else if (typeof $module[method] == 'function') - exec = $module[method] - - if (!exec) - return console.error('NO SUCH METHOD:', method) - - exec.apply(null, args.concat([ callback ])) -} - - -process.on('message', function (data) { - if (data.owner !== 'farm') { - return; - } - - if (!$module) return $module = require(data.module) - if (data.event == 'die') return process.exit(0) - handle(data) -}) |