Bull: Add 'every' RepeatOptions property (#27227)

* add 'every' repeatoptions property

* fix linting

* version number

* remove patch version from header
This commit is contained in:
Luke
2018-07-15 12:27:05 -07:00
committed by Ryan Cavanaugh
parent 81b2d6f869
commit 2b130f9106
+15 -6
View File
@@ -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