@clairejs/server 3.22.2 → 3.22.4
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/README.md +6 -1
- package/dist/job/AwsJobScheduler.js +2 -1
- package/dist/system/LambdaWrapper.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
## Change Log
|
|
2
2
|
|
|
3
|
-
#### 3.22.
|
|
3
|
+
#### 3.22.4:
|
|
4
4
|
|
|
5
|
+
- add log to debug aws cron
|
|
6
|
+
|
|
7
|
+
#### 3.22.3:
|
|
8
|
+
|
|
9
|
+
- fix AwsCron expression
|
|
5
10
|
- fix ModelRepository return correct vector props nested fields
|
|
6
11
|
- fix uri mapper to map Identifiable classes
|
|
7
12
|
- remove support of uri mapper for locale fields
|
|
@@ -33,6 +33,7 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
|
|
|
33
33
|
}
|
|
34
34
|
async handleCron(jobInfo) {
|
|
35
35
|
this.logger.debug(`Handle cron`, jobInfo);
|
|
36
|
+
console.log("handling cron", JSON.stringify(jobInfo));
|
|
36
37
|
await this.executeJob(jobInfo);
|
|
37
38
|
}
|
|
38
39
|
async afterJob(_job, _tx) {
|
|
@@ -45,7 +46,7 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
|
|
|
45
46
|
date.getUTCMinutes(),
|
|
46
47
|
date.getUTCHours(),
|
|
47
48
|
date.getUTCDate(),
|
|
48
|
-
date.getUTCMonth(),
|
|
49
|
+
date.getUTCMonth() + 1,
|
|
49
50
|
"?",
|
|
50
51
|
date.getUTCFullYear(),
|
|
51
52
|
].join(" ");
|
|
@@ -89,9 +89,11 @@ export class LambdaWrapper {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
async handler(event) {
|
|
92
|
+
console.log("lambda wrapper handler");
|
|
92
93
|
await this.bootServer();
|
|
93
94
|
//-- handle http otherwise
|
|
94
95
|
const requestOptions = this.requestMapper(event);
|
|
96
|
+
console.log("request optons", JSON.stringify(requestOptions));
|
|
95
97
|
if (!requestOptions) {
|
|
96
98
|
throw Errors.SYSTEM_ERROR("Cannot resolve event");
|
|
97
99
|
}
|
|
@@ -100,6 +102,7 @@ export class LambdaWrapper {
|
|
|
100
102
|
return toApiGatewayFormat({ code: 200, headers: corsHeaders, cookies: {} });
|
|
101
103
|
}
|
|
102
104
|
if (requestOptions.method === CRON_REQUEST_METHOD) {
|
|
105
|
+
console.log("request handle cron", !!this.jobScheduler);
|
|
103
106
|
await this.jobScheduler?.handleCron(requestOptions.body);
|
|
104
107
|
return toApiGatewayFormat({ code: 200, headers: corsHeaders, cookies: {} });
|
|
105
108
|
}
|