@orion-js/dogs 3.1.0 → 3.1.7
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.
- package/LICENSE +1 -1
- package/lib/services/Executor.js +2 -1
- package/lib/types/JobsDefinition.d.ts +1 -1
- package/package.json +7 -7
package/LICENSE
CHANGED
package/lib/services/Executor.js
CHANGED
|
@@ -77,7 +77,8 @@ let Executor = class Executor {
|
|
|
77
77
|
const { startedAt, status, errorMessage, result, job, jobToRun } = options;
|
|
78
78
|
const endedAt = new Date();
|
|
79
79
|
if (job.saveExecutionsFor !== 0) {
|
|
80
|
-
const
|
|
80
|
+
const oneWeek = 1000 * 60 * 60 * 24 * 7;
|
|
81
|
+
const saveExecutionsFor = job.saveExecutionsFor || oneWeek;
|
|
81
82
|
await this.jobsHistoryRepo.saveExecution({
|
|
82
83
|
executionId: jobToRun.jobId,
|
|
83
84
|
jobName: jobToRun.name,
|
|
@@ -24,7 +24,7 @@ export interface BaseJobDefinition {
|
|
|
24
24
|
*/
|
|
25
25
|
onStale?: (params: PlainObject, context: ExecutionContext) => Promise<void>;
|
|
26
26
|
/**
|
|
27
|
-
* Save the executions of the job time in milliseconds. Default is 1
|
|
27
|
+
* Save the executions of the job time in milliseconds. Default is 1 week. Set to 0 to disable.
|
|
28
28
|
*/
|
|
29
29
|
saveExecutionsFor?: number;
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/dogs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"upgrade-interactive": "yarn upgrade-interactive"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@orion-js/helpers": "^3.
|
|
21
|
-
"@orion-js/mongodb": "^3.1.
|
|
22
|
-
"@orion-js/services": "^3.1.
|
|
23
|
-
"@orion-js/typed-model": "^3.
|
|
20
|
+
"@orion-js/helpers": "^3.1.6",
|
|
21
|
+
"@orion-js/mongodb": "^3.1.7",
|
|
22
|
+
"@orion-js/services": "^3.1.6",
|
|
23
|
+
"@orion-js/typed-model": "^3.1.6"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@orion-js/logger": "3.1.0-alpha.12"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@orion-js/logger": "^3.1.
|
|
29
|
+
"@orion-js/logger": "^3.1.6",
|
|
30
30
|
"@shelf/jest-mongodb": "^2.1.0",
|
|
31
31
|
"@types/jest": "^27.0.2",
|
|
32
32
|
"@types/lodash": "4.14.176",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "9513b378760e379b93663128ceff8d97e5c41592"
|
|
43
43
|
}
|