repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore: generate documentation
[poolifier.git]
/
src
/
pools
/
pool.ts
diff --git
a/src/pools/pool.ts
b/src/pools/pool.ts
index 14b30812d14bd21e55c0af4aee77db5daf8bc7e4..89559d2c9a1bf0e6694709d3908a0263af0c448e 100644
(file)
--- a/
src/pools/pool.ts
+++ b/
src/pools/pool.ts
@@
-39,7
+39,8
@@
export class PoolEmitter extends EventEmitterAsyncResource {}
*/
export const PoolEvents = Object.freeze({
full: 'full',
*/
export const PoolEvents = Object.freeze({
full: 'full',
- busy: 'busy'
+ busy: 'busy',
+ error: 'error'
} as const)
/**
} as const)
/**
@@
-91,6
+92,10
@@
export interface PoolOptions<Worker extends IWorker> {
* The worker choice strategy options.
*/
workerChoiceStrategyOptions?: WorkerChoiceStrategyOptions
* The worker choice strategy options.
*/
workerChoiceStrategyOptions?: WorkerChoiceStrategyOptions
+ /**
+ * Restart worker on error.
+ */
+ restartWorkerOnError?: boolean
/**
* Pool events emission.
*
/**
* Pool events emission.
*
@@
-142,6
+147,7
@@
export interface IPool<
*
* - `'full'`: Emitted when the pool is dynamic and full.
* - `'busy'`: Emitted when the pool is busy.
*
* - `'full'`: Emitted when the pool is dynamic and full.
* - `'busy'`: Emitted when the pool is busy.
+ * - `'error'`: Emitted when an error occurs.
*/
readonly emitter?: PoolEmitter
/**
*/
readonly emitter?: PoolEmitter
/**