mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Add typings for getJobs and fix remove repeatable 'repeat' param (#27602)
This commit is contained in:
Vendored
+9
-2
@@ -8,6 +8,7 @@
|
||||
// Oleg Repin <https://github.com/iamolegga>
|
||||
// David Koblas <https://github.com/koblas>
|
||||
// Bond Akinmade <https://github.com/bondz>
|
||||
// Wuha Team <https://github.com/wuha-team>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -534,7 +535,7 @@ declare namespace Bull {
|
||||
* Removes a given repeatable job. The RepeatOptions and JobId needs to be the same as the ones
|
||||
* used for the job when it was added.
|
||||
*/
|
||||
removeRepeatable(repeat: RepeatOptions & { jobId?: JobId }): Promise<void>;
|
||||
removeRepeatable(repeat: (CronRepeatOptions | EveryRepeatOptions) & { jobId?: JobId }): Promise<void>;
|
||||
|
||||
/**
|
||||
* Removes a given repeatable job. The RepeatOptions and JobId needs to be the same as the ones
|
||||
@@ -542,7 +543,13 @@ declare namespace Bull {
|
||||
*
|
||||
* name: The name of the to be removed job
|
||||
*/
|
||||
removeRepeatable(name: string, repeat: RepeatOptions & { jobId?: JobId }): Promise<void>;
|
||||
removeRepeatable(name: string, repeat: (CronRepeatOptions | EveryRepeatOptions) & { jobId?: JobId }): Promise<void>;
|
||||
|
||||
/**
|
||||
* Returns a promise that will return an array of job instances of the given types.
|
||||
* Optional parameters for range and ordering are provided.
|
||||
*/
|
||||
getJobs(types: string[], start?: number, end?: number, asc?: boolean): Promise<Job[]>;
|
||||
|
||||
/**
|
||||
* Returns a promise that resolves with the job counts for the given queue.
|
||||
|
||||
Reference in New Issue
Block a user