import type { App } from '../../app';
import { ScopedLogger } from '../logger';
import { WorkerQueueRegistry } from './queue';
import { WorkerRecorderService } from './recorder';
import { type IJobOptions, type QueuedWorkerJob } from './types';
export interface WorkerExecutionResult<I = unknown, O = unknown> {
    job: QueuedWorkerJob<I>;
    result: O;
}
export declare class WorkerRunnerService {
    private readonly app;
    private readonly queueRegistry;
    private readonly recorder;
    private readonly logger;
    private running;
    private readonly timers;
    private readonly executing;
    private readonly bullWorkers;
    private readonly bullWorkerRedisLifecycleCleanup;
    private bullWorkerRedisMonitor?;
    constructor(app: App, queueRegistry: WorkerQueueRegistry, recorder: WorkerRecorderService, logger: ScopedLogger);
    start(): Promise<void>;
    shutdown(): Promise<void>;
    schedule(job: QueuedWorkerJob): void;
    drainReadyJobs(queue?: string): Promise<void>;
    executeQueuedJob<I, O>(job: QueuedWorkerJob<I>, options?: IJobOptions): Promise<WorkerExecutionResult<I, O>>;
    private scheduleCronJobs;
    private rescheduleCronJob;
    private runScheduledJob;
    private resolveJob;
    private isRegisteredJob;
    private hasQueuedRepeatJob;
    private startBullMqWorkers;
    private scheduleBullMqCronJobs;
    private executeBullMqJob;
    private resolveJobClassByName;
    private getRegisteredQueueNames;
}
//# sourceMappingURL=runner.d.ts.map