bull - add missing whenCurrentJobsFinished typings (#41625)

* add whenCurrentJobsFinished to bull module

* bump version of bull package
This commit is contained in:
Levi Bostian 2020-01-16 10:15:05 -06:00 committed by Eli Barzilay
parent 0336b73b10
commit c8dc68c146
2 changed files with 12 additions and 1 deletions

View File

@ -165,6 +165,11 @@ videoQueue.add({ video: 'http://example.com/video1.mov' }, { jobId: 1 })
// error
});
pdfQueue.whenCurrentJobsFinished()
.then(() => {
// Jobs finished
});
//////////////////////////////////////////////////////////////////////////////////
//
// Typed Event Handlers

View File

@ -1,4 +1,4 @@
// Type definitions for bull 3.10
// Type definitions for bull 3.12
// Project: https://github.com/OptimalBits/bull
// Definitions by: Bruno Grieder <https://github.com/bgrieder>
// Cameron Crothers <https://github.com/JProgrammer>
@ -17,6 +17,7 @@
// DoYoung Ha <https://github.com/hados99>
// Borys Kupar <https://github.com/borys-kupar>
// Remko Klein <https://github.com/remko79>
// Levi Bostian <https://github.com/levibostian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@ -846,6 +847,11 @@ declare namespace Bull {
* @param list String with all redis clients
*/
parseClientList(list: string): Redis.Redis[];
/**
* Returns a promise that resolves when active jobs are finished
*/
whenCurrentJobsFinished(): Promise<void>;
}
type EventCallback = () => void;