import PollingTimer from 'polling-timer'; import { Logger } from '../logger'; import { IWorkerParams } from './IWorkerParams'; import { QueueConcurrency } from './QueueConcurrency'; import { AbstractWorkerStore } from './AbstractWorkerStore'; export declare class QueueLauncher { protected directWorker: (params: any, onEnd: () => void, onRetry: (reason?: string) => void, onError: (error: any) => void) => Promise; protected threadWorker: (params: any, onEnd: () => void, onRetry: (reason?: string) => void, onError: (error: any) => void, onBlocking?: (error: any) => void) => void; protected workerStore?: AbstractWorkerStore; protected logger?: Logger; protected options?: { workerProcessorPathFile?: string; queueConcurrency?: QueueConcurrency; pollingTimeInMilliSec?: number; disablePolling?: boolean; name?: string; }; protected pollingTimer: PollingTimer; protected shouldStopAll: boolean; protected blockingDetected: boolean; constructor(directWorker: (params: any, onEnd: () => void, onRetry: (reason?: string) => void, onError: (error: any) => void) => Promise, threadWorker: (params: any, onEnd: () => void, onRetry: (reason?: string) => void, onError: (error: any) => void, onBlocking?: (error: any) => void) => void, workerStore?: AbstractWorkerStore, logger?: Logger, options?: { workerProcessorPathFile?: string; queueConcurrency?: QueueConcurrency; pollingTimeInMilliSec?: number; disablePolling?: boolean; name?: string; }); isRunning(): boolean; add(params: IWorkerParams): Promise; stopAll(stop?: boolean): void; end(params: IWorkerParams): Promise; error(params: IWorkerParams): Promise; clean(): void; hasBlockingError(): boolean; setQueueConcurrency(queueConcurrency: QueueConcurrency): void; setWorkerStore(store: AbstractWorkerStore): void; protected stopPolling(): void; protected startPolling(): void; protected syncQueuesFromStore(): Promise; protected pollerCallback(): Promise; protected executeWorker(params: IWorkerParams): void; protected getKeyConcurrency(queueProcesses: string[]): { key: string; concurrency: number; }; }