Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
export { FixedClusterPool } from './pools/cluster/fixed'
export type { ClusterPoolOptions } from './pools/cluster/fixed'
export { PoolEvents } from './pools/pool'
-export type { IPool, PoolEmitter, PoolOptions, PoolEvent } from './pools/pool'
+export type {
+ IPool,
+ PoolEmitter,
+ PoolOptions,
+ PoolEvent,
+ TasksQueueOptions
+} from './pools/pool'
export type {
ErrorHandler,
ExitHandler,
+ IWorker,
MessageHandler,
OnlineHandler
} from './pools/worker'
* Pool worker tasks queue options.
*
* @experimental
- * @defaultValue \{ concurrency: 1 \}
*/
tasksQueueOptions?: TasksQueueOptions
}
* Worker task interface.
*/
export interface Task<Data = unknown> {
+ /**
+ * Worker task data.
+ */
data: Data
+ /**
+ * Task UUID.
+ */
id: string
}