UNPKG

@cavai/adonis-queue

Version:
32 lines (31 loc) 890 B
import { Dispatcher } from './Dispatcher'; import { QueueManager } from './QueueManager'; export declare class BaseJob { constructor(..._: any[]); /** * Nr of times job is re-tried before it is marked as failed */ static retries: number; /** * Delay for retries in seconds, so other jobs get chance to run */ static retryAfter: number; /** * Filesystem path to job class */ static classPath: string; /** * Instance of queue manager */ static queueManager: QueueManager<any>; /** * Sets queueManager to current job */ static useQueue(queueManager: any): void; /** * Dispatches job to be queued up for execution * * @param data Data to pass to job class instance */ static dispatch<T extends typeof BaseJob>(this: T, ...data: ConstructorParameters<T>): Dispatcher<T>; }