mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[bull] Fixed queue process function definition (#36958)
* [bull] Fixed queue process function definition * Revert version bump
This commit is contained in:
committed by
Wesley Wigham
parent
8825742790
commit
4413fb75c4
@@ -51,6 +51,9 @@ videoQueue.process((job, done) => {
|
||||
|
||||
// If the job throws an unhandled exception it is also handled correctly
|
||||
throw new Error('some unexpected error');
|
||||
}).catch(error => {
|
||||
// Catch the general error, like redis connection
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
audioQueue.process((job, done) => {
|
||||
|
||||
Vendored
+13
-12
@@ -15,6 +15,7 @@
|
||||
// Christian D. <https://github.com/pc-jedi>
|
||||
// Silas Rech <https://github.com/lenovouser>
|
||||
// DoYoung Ha <https://github.com/hados99>
|
||||
// Borys Kupar <https://github.com/borys-kupar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -475,9 +476,9 @@ declare namespace Bull {
|
||||
* If the promise is rejected, the error will be passed as a second argument to the "failed" event.
|
||||
* If it is resolved, its value will be the "completed" event's second argument.
|
||||
*/
|
||||
process(callback: ProcessCallbackFunction<T>): void;
|
||||
process(callback: ProcessPromiseFunction<T>): void;
|
||||
process(callback: string): void;
|
||||
process(callback: ProcessCallbackFunction<T>): Promise<void>;
|
||||
process(callback: ProcessPromiseFunction<T>): Promise<void>;
|
||||
process(callback: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
@@ -498,9 +499,9 @@ declare namespace Bull {
|
||||
*
|
||||
* @param concurrency Bull will then call your handler in parallel respecting this maximum value.
|
||||
*/
|
||||
process(concurrency: number, callback: ProcessCallbackFunction<T>): void;
|
||||
process(concurrency: number, callback: ProcessPromiseFunction<T>): void;
|
||||
process(concurrency: number, callback: string): void;
|
||||
process(concurrency: number, callback: ProcessCallbackFunction<T>): Promise<void>;
|
||||
process(concurrency: number, callback: ProcessPromiseFunction<T>): Promise<void>;
|
||||
process(concurrency: number, callback: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
@@ -521,9 +522,9 @@ declare namespace Bull {
|
||||
*
|
||||
* @param name Bull will only call the handler if the job name matches
|
||||
*/
|
||||
process(name: string, callback: ProcessCallbackFunction<T>): void;
|
||||
process(name: string, callback: ProcessPromiseFunction<T>): void;
|
||||
process(name: string, callback: string): void;
|
||||
process(name: string, callback: ProcessCallbackFunction<T>): Promise<void>;
|
||||
process(name: string, callback: ProcessPromiseFunction<T>): Promise<void>;
|
||||
process(name: string, callback: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Defines a processing function for the jobs placed into a given Queue.
|
||||
@@ -545,9 +546,9 @@ declare namespace Bull {
|
||||
* @param name Bull will only call the handler if the job name matches
|
||||
* @param concurrency Bull will then call your handler in parallel respecting this maximum value.
|
||||
*/
|
||||
process(name: string, concurrency: number, callback: ProcessCallbackFunction<T>): void;
|
||||
process(name: string, concurrency: number, callback: ProcessPromiseFunction<T>): void;
|
||||
process(name: string, concurrency: number, callback: string): void;
|
||||
process(name: string, concurrency: number, callback: ProcessCallbackFunction<T>): Promise<void>;
|
||||
process(name: string, concurrency: number, callback: ProcessPromiseFunction<T>): Promise<void>;
|
||||
process(name: string, concurrency: number, callback: string): Promise<void>;
|
||||
|
||||
/* tslint:enable:unified-signatures */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user