| 106 | } |
| 107 | |
| 108 | interface Job<T> extends EventEmitter { |
| 109 | id: string; |
| 110 | data: T; |
| 111 | readonly options: any; |
| 112 | queue: BeeQueue<T>; |
| 113 | progress: any; |
| 114 | status: 'created' | 'succeeded' | 'failed' | 'retrying'; |
| 115 | |
| 116 | on(ev: 'succeeded', fn: (result: any) => void): this; |
| 117 | on(ev: 'retrying', fn: (err: Error) => void): this; |
| 118 | on(ev: 'failed', fn: (err: Error) => void): this; |
| 119 | on(ev: 'progress', fn: (progress: any) => void): this; |
| 120 | |
| 121 | setId(id: string): this; |
| 122 | retries(n: number): this; |
| 123 | backoff(strategy: string, delayFactor?: number): this; |
| 124 | delayUntil(dateOrTimestamp: Date | number): this; |
| 125 | timeout(milliseconds: number): this; |
| 126 | save(): Promise<this>; |
| 127 | save(cb: (err: Error, job: this) => void): void; |
| 128 | reportProgress(p: any): void; |
| 129 | remove(): Promise<this>; |
| 130 | remove(cb: (job: this) => void): void; |
| 131 | } |
| 132 | |
| 133 | interface Page { |
| 134 | start?: number; |
no outgoing calls
no test coverage detected