repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Comment cleanup
[poolifier.git]
/
src
/
pools
/
cluster
/
fixed.ts
diff --git
a/src/pools/cluster/fixed.ts
b/src/pools/cluster/fixed.ts
index 95ea82b9697a12758a8118dc3ec0c308d8893427..971116bc27cfbd3cd470faa83a904a3949984920 100644
(file)
--- a/
src/pools/cluster/fixed.ts
+++ b/
src/pools/cluster/fixed.ts
@@
-1,7
+1,8
@@
-import { fork, isMaster, setupMaster, Worker } from 'cluster'
+import type { Worker } from 'cluster'
+import cluster from 'cluster'
import type { MessageValue } from '../../utility-types'
import type { MessageValue } from '../../utility-types'
-import type { PoolOptions } from '../abstract-pool'
import { AbstractPool } from '../abstract-pool'
import { AbstractPool } from '../abstract-pool'
+import type { PoolOptions } from '../pool'
import { PoolType } from '../pool-internal'
/**
import { PoolType } from '../pool-internal'
/**
@@
-50,14
+51,14
@@
export class FixedClusterPool<
/** @inheritdoc */
protected setupHook (): void {
/** @inheritdoc */
protected setupHook (): void {
-
setupMaster
({
+
cluster.setupPrimary
({
exec: this.filePath
})
}
/** @inheritdoc */
protected isMain (): boolean {
exec: this.filePath
})
}
/** @inheritdoc */
protected isMain (): boolean {
- return
isMaster
+ return
cluster.isPrimary
}
/** @inheritdoc */
}
/** @inheritdoc */
@@
-81,7
+82,7
@@
export class FixedClusterPool<
/** @inheritdoc */
protected createWorker (): Worker {
/** @inheritdoc */
protected createWorker (): Worker {
- return fork(this.opts.env)
+ return
cluster.
fork(this.opts.env)
}
/** @inheritdoc */
}
/** @inheritdoc */