X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fcluster-worker.ts;h=1d2729812f905d9f9724e5bf9106358ae8aa893a;hb=d4aeae5aa9e260c8c2f6d28f3133de368552c108;hp=655520ccedb84aeccc0c1231dfb7c4566747e2c0;hpb=89b09b2646d240a5a30531b2fc742fdba209fa13;p=poolifier.git diff --git a/src/worker/cluster-worker.ts b/src/worker/cluster-worker.ts index 655520cc..1d272981 100644 --- a/src/worker/cluster-worker.ts +++ b/src/worker/cluster-worker.ts @@ -28,7 +28,10 @@ export class ClusterWorker< * @param fn - Function processed by the worker when the pool's `execution` function is invoked. * @param opts - Options for the worker. */ - public constructor (fn: (data: Data) => Response, opts: WorkerOptions = {}) { + public constructor ( + fn: (data: Data) => Response | Promise, + opts: WorkerOptions = {} + ) { super( 'worker-cluster-pool:poolifier', cluster.isPrimary,