@orion-js/dogs 3.1.0-alpha.1 → 3.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,6 +11,9 @@ const getNextRunDate = (options) => {
|
|
|
11
11
|
if (options.runAt) {
|
|
12
12
|
return options.runAt;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
if (options.getNextRun) {
|
|
15
|
+
return options.getNextRun();
|
|
16
|
+
}
|
|
17
|
+
return new Date();
|
|
15
18
|
};
|
|
16
19
|
exports.getNextRunDate = getNextRunDate;
|
package/lib/types/Events.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare type ScheduleJobOptionsRunIn = ScheduleJobOptionsBase & {
|
|
|
11
11
|
export declare type ScheduleJobOptionsRunAt = ScheduleJobOptionsBase & {
|
|
12
12
|
runAt: Date;
|
|
13
13
|
};
|
|
14
|
-
export declare type ScheduleJobOptions = ScheduleJobOptionsRunIn | ScheduleJobOptionsRunAt;
|
|
14
|
+
export declare type ScheduleJobOptions = ScheduleJobOptionsRunIn | ScheduleJobOptionsRunAt | ScheduleJobOptionsBase;
|
|
15
15
|
export interface ScheduleJobRecordOptions {
|
|
16
16
|
name: string;
|
|
17
17
|
params: PlainObject;
|
|
@@ -9,7 +9,7 @@ export declare type JobRetryResultRunIn = JobRetryResultBase & {
|
|
|
9
9
|
export declare type JobRetryResultRunAt = JobRetryResultBase & {
|
|
10
10
|
runAt: Date;
|
|
11
11
|
};
|
|
12
|
-
export declare type JobRetryResult = JobRetryResultRunIn | JobRetryResultRunAt;
|
|
12
|
+
export declare type JobRetryResult = JobRetryResultRunIn | JobRetryResultRunAt | JobRetryResultBase;
|
|
13
13
|
export interface BaseJobDefinition {
|
|
14
14
|
/**
|
|
15
15
|
* The function to execute when the job is executed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/dogs",
|
|
3
|
-
"version": "3.1.0-alpha.
|
|
3
|
+
"version": "3.1.0-alpha.3",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "4ce1a878c45f16c189a276424e6413eb89019023"
|
|
39
39
|
}
|