mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Bull: Add 'every' RepeatOptions property (#27227)
* add 'every' repeatoptions property * fix linting * version number * remove patch version from header
This commit is contained in:
Vendored
+15
-6
@@ -159,11 +159,6 @@ declare namespace Bull {
|
||||
}
|
||||
|
||||
interface RepeatOptions {
|
||||
/**
|
||||
* Cron pattern specifying when the job should execute
|
||||
*/
|
||||
cron: string;
|
||||
|
||||
/**
|
||||
* Timezone
|
||||
*/
|
||||
@@ -180,6 +175,20 @@ declare namespace Bull {
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
interface CronRepeatOptions extends RepeatOptions {
|
||||
/**
|
||||
* Cron pattern specifying when the job should execute
|
||||
*/
|
||||
cron: string;
|
||||
}
|
||||
|
||||
interface EveryRepeatOptions extends RepeatOptions {
|
||||
/**
|
||||
* Repeat every millis (cron setting cannot be used together with this setting.)
|
||||
*/
|
||||
every: number;
|
||||
}
|
||||
|
||||
interface JobOptions {
|
||||
/**
|
||||
* Optional priority value. ranges from 1 (highest priority) to MAX_INT (lowest priority).
|
||||
@@ -201,7 +210,7 @@ declare namespace Bull {
|
||||
/**
|
||||
* Repeat job according to a cron specification
|
||||
*/
|
||||
repeat?: RepeatOptions;
|
||||
repeat?: CronRepeatOptions | EveryRepeatOptions;
|
||||
|
||||
/**
|
||||
* Backoff setting for automatic retries if the job fails
|
||||
|
||||
Reference in New Issue
Block a user