@types/bull: ready event was replaced by Queue#isReady()

This commit is contained in:
marshall007
2017-06-07 17:34:50 -05:00
parent e99d48a0e1
commit baf6a3bb98
2 changed files with 6 additions and 6 deletions

View File

@@ -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
View File

@@ -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
*/