D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
cpanel
/
ea-nodejs10
/
lib
/
node_modules
/
npm
/
node_modules
/
worker-farm
/
lib
/
Filename :
index.js
back
Copy
'use strict' const Farm = require('./farm') let farms = [] // keep record of farms so we can end() them if required function farm (options, path, methods) { if (typeof options == 'string') { methods = path path = options options = {} } let f = new Farm(options, path) , api = f.setup(methods) farms.push({ farm: f, api: api }) // return the public API return api } function end (api, callback) { for (let i = 0; i < farms.length; i++) if (farms[i] && farms[i].api === api) return farms[i].farm.end(callback) process.nextTick(callback.bind(null, new Error('Worker farm not found!'))) } module.exports = farm module.exports.end = end
Name
Size
Last Modified
Owner
Permissions
Actions
child
Dir
December 10 2023 3:46:28
root
0755
farm.js
9.464
KB
September 13 2023 2:48:05
root
0644
fork.js
0.883
KB
September 13 2023 2:48:05
root
0644
index.js
0.675
KB
September 13 2023 2:48:05
root
0644
2017 © D7net | D704T team