repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): bump poolifier
[poolifier.git]
/
tests
/
worker-files
/
cluster
/
testWorker.js
diff --git
a/tests/worker-files/cluster/testWorker.js
b/tests/worker-files/cluster/testWorker.js
index e79a2102741554178e8c135e136562d6908fa235..57715266bcf7c181c955b4995ec4ee9b9c46c981 100644
(file)
--- a/
tests/worker-files/cluster/testWorker.js
+++ b/
tests/worker-files/cluster/testWorker.js
@@
-1,20
+1,15
@@
'use strict'
'use strict'
-const { isMaster } = require('cluster')
const { ClusterWorker, KillBehaviors } = require('../../../lib')
const { ClusterWorker, KillBehaviors } = require('../../../lib')
-const { execute
WorkerFunction } = require('../../test-util
s')
-const {
WorkerFunctions } = require('../../test-type
s')
+const { execute
TaskFunction } = require('../../test-utils.j
s')
+const {
TaskFunctions } = require('../../test-types.j
s')
function test (data) {
data = data || {}
function test (data) {
data = data || {}
- data.function = data.function || WorkerFunctions.jsonIntegerSerialization
- const result = executeWorkerFunction(data)
- if (result == null) {
- return isMaster
- }
- return result
+ data.function = data.function || TaskFunctions.jsonIntegerSerialization
+ return executeTaskFunction(data)
}
module.exports = new ClusterWorker(test, {
}
module.exports = new ClusterWorker(test, {
-
maxInactiveTime: 500
,
- killBehavior: KillBehaviors.HARD
+
killBehavior: KillBehaviors.HARD
,
+ maxInactiveTime: 500
})
})