import { Container } from 'inversify'; import { Config } from '../config'; import { Processor } from './processor.service'; type ProcessorConfig = Pick; /** * Builds instance of a Processor. See `Processor` for more details. */ declare class ProcessorBuilder { private config; private jobMethods; private shouldRegisterTimeoutHandlers; private timeoutHandlersManuallySet; static init(): ProcessorBuilder; /** * Registers options that will be used by the scheduling system built by this builder. * By default, the given options will override existing options. If `override` is passed as `false`, the * options will be merged with existing options. * @param options * @param override Default is `true` * @returns */ useConfig(options: ProcessorConfig, override?: boolean): this; /** * Call if you wish to set whether or not timeout handlers will be calculated and registered. * By default, they are registered, so in that case you do not need to call this. * @param shouldRegister * @returns */ useRegistrationForTimeoutHandlers(shouldRegister?: boolean): this; /** * Set `Processor` to process only jobs whose `method` is contained in the `jobMethods` array. If this is not called or empty array is provided, the `Processor` will handle all jobs regardless of `method`. * @param jobMethods Job methods to process * @returns */ useMethods(jobMethods: string[]): this; build(container?: Container): Processor; } export { ProcessorBuilder, ProcessorConfig };