mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-04 19:42:46 +08:00
@types/bull: ready event was replaced by Queue#isReady()
This commit is contained in:
@@ -120,7 +120,6 @@ videoQueue.add({ video: 'http://example.com/video1.mov' }, { jobId: 1 })
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
pdfQueue
|
||||
.on('ready', () => undefined)
|
||||
.on('error', (err: Error) => undefined)
|
||||
.on('active', (job: Queue.Job, jobPromise: Queue.JobPromise) => jobPromise.cancel())
|
||||
.on('active', (job: Queue.Job) => undefined)
|
||||
|
||||
11
types/bull/index.d.ts
vendored
11
types/bull/index.d.ts
vendored
@@ -207,6 +207,12 @@ declare namespace Bull {
|
||||
}
|
||||
|
||||
interface Queue {
|
||||
/**
|
||||
* Returns a promise that resolves when Redis is connected and the queue is ready to accept jobs.
|
||||
* This replaces the `ready` event emitted on Queue in previous verisons.
|
||||
*/
|
||||
isReady(): Promise<this>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
*
|
||||
@@ -329,11 +335,6 @@ declare namespace Bull {
|
||||
*/
|
||||
on(event: string, callback: (...args: any[]) => void): this;
|
||||
|
||||
/**
|
||||
* Redis is connected and the queue is ready to accept jobs
|
||||
*/
|
||||
on(event: 'ready', callback: EventCallback): this;
|
||||
|
||||
/**
|
||||
* An error occured
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user