import { Redis } from "ioredis"; import { Closable } from "../Closable"; import { Job } from "../Job"; import type { ScheduleMap } from "../index"; import { AcknowledgementDescriptor, Acknowledger, OnError } from "../shared/acknowledger"; import * as opentracing from "opentracing"; import type { Logger } from "pino"; declare module "ioredis" { interface RedisCommander { request(currentTimestamp: number): Promise<[ queue: string, id: string, payload: string, runAt: string, schedule_type: string, schedule_meta: string, count: string, max_times: string, exclusive: "true" | "false", retry: string | null ] | null | -1 | number>; } } export declare type Processor = (job: Readonly>, ackDescriptor: AcknowledgementDescriptor, span: opentracing.Span) => Promise; export declare function getNextExecutionDate(scheduleMap: ScheduleMap, schedule_type: ScheduleType | undefined, schedule_meta: string, lastExecution: Date): number | undefined; export declare class Worker implements Closable { private readonly scheduleMap; private readonly processor; private readonly logger?; private readonly maximumConcurrency; private readonly redis; private readonly redisSub; readonly acknowledger: Acknowledger; constructor(redisFactory: () => Redis, scheduleMap: ScheduleMap, processor: Processor, onError?: OnError, logger?: Logger | undefined, maximumConcurrency?: number); start(): Promise; private listenForPubs; private getNextExecutionDate; private readonly distributor; close(): Promise; } //# sourceMappingURL=worker.d.ts.map