import { Job } from 'bull';
import { ActivitypubFollowPayload, ActivitypubHttpBroadcastPayload, ActivitypubHttpFetcherPayload, ActivitypubHttpUnicastPayload, ActorKeysPayload, DeleteResumableUploadMetaFilePayload, EmailPayload, JobState, JobType, MoveObjectStoragePayload, RefreshPayload, VideoFileImportPayload, VideoImportPayload, VideoLiveEndingPayload, VideoRedundancyPayload, VideoTranscodingPayload } from '../../../shared/models';
declare type CreateJobArgument = {
    type: 'activitypub-http-broadcast';
    payload: ActivitypubHttpBroadcastPayload;
} | {
    type: 'activitypub-http-unicast';
    payload: ActivitypubHttpUnicastPayload;
} | {
    type: 'activitypub-http-fetcher';
    payload: ActivitypubHttpFetcherPayload;
} | {
    type: 'activitypub-http-cleaner';
    payload: {};
} | {
    type: 'activitypub-follow';
    payload: ActivitypubFollowPayload;
} | {
    type: 'video-file-import';
    payload: VideoFileImportPayload;
} | {
    type: 'video-transcoding';
    payload: VideoTranscodingPayload;
} | {
    type: 'email';
    payload: EmailPayload;
} | {
    type: 'video-import';
    payload: VideoImportPayload;
} | {
    type: 'activitypub-refresher';
    payload: RefreshPayload;
} | {
    type: 'videos-views-stats';
    payload: {};
} | {
    type: 'video-live-ending';
    payload: VideoLiveEndingPayload;
} | {
    type: 'actor-keys';
    payload: ActorKeysPayload;
} | {
    type: 'video-redundancy';
    payload: VideoRedundancyPayload;
} | {
    type: 'delete-resumable-upload-meta-file';
    payload: DeleteResumableUploadMetaFilePayload;
} | {
    type: 'move-to-object-storage';
    payload: MoveObjectStoragePayload;
};
export declare type CreateJobOptions = {
    delay?: number;
    priority?: number;
};
declare const jobTypes: JobType[];
declare class JobQueue {
    private static instance;
    private queues;
    private initialized;
    private jobRedisPrefix;
    private constructor();
    init(produceOnly?: boolean): void;
    terminate(): void;
    pause(): Promise<void>;
    resume(): Promise<void>;
    createJob(obj: CreateJobArgument, options?: CreateJobOptions): void;
    createJobWithPromise(obj: CreateJobArgument, options?: CreateJobOptions): any;
    listForApi(options: {
        state?: JobState;
        start: number;
        count: number;
        asc?: boolean;
        jobType: JobType;
    }): Promise<Job[]>;
    count(state: JobState, jobType?: JobType): Promise<number>;
    removeOldJobs(): Promise<void>;
    private addRepeatableJobs;
    private filterJobTypes;
    private getJobConcurrency;
    static get Instance(): JobQueue;
}
export { jobTypes, JobQueue };
//# sourceMappingURL=job-queue.d.ts.map