X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fcluster-worker.ts;h=1d2729812f905d9f9724e5bf9106358ae8aa893a;hb=8f52842f4b4fa9059f25fc4a90e8bbe8db2f5e63;hp=655520ccedb84aeccc0c1231dfb7c4566747e2c0;hpb=afc003b20097712625ffd053e256ef5336e27b6e;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,