@clairejs/server 3.21.3 → 3.21.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Change Log
2
2
 
3
- #### 3.21.3:
3
+ #### 3.21.4:
4
4
 
5
5
  - fix cron expression
6
6
  - add log to aws job scheduler & fix cronjob sync
@@ -82,13 +82,14 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
82
82
  this.logger.debug("Scheduling job: ", jobInfo);
83
83
  if (jobInfo.cron || jobInfo.at) {
84
84
  const jobId = `${this.jobNamePrefix}${this.uniqueJobIdFactory()}`;
85
- //-- generate pattern from cron (add * at the end for year) / at timestamp
86
85
  let cronExpression;
87
86
  if (jobInfo.at) {
87
+ this.logger.debug("At job", jobInfo.at);
88
88
  cronExpression = this.generateCronFromTimestamp(jobInfo.at);
89
89
  }
90
90
  else if (jobInfo.cron) {
91
91
  let cron = jobInfo.cron;
92
+ this.logger.debug("Cron job", cron, cron.endsWith(" *"));
92
93
  if (cron.endsWith(" *")) {
93
94
  cronExpression = `${cron.slice(0, -2)} ?`;
94
95
  }
@@ -99,7 +100,7 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
99
100
  await this.eventbridge
100
101
  .putRule({
101
102
  Name: jobId,
102
- Description: `${jobInfo.jobName} - ${jobInfo.cron || jobInfo.at}`,
103
+ Description: `${jobInfo.jobName} - ${cronExpression || jobInfo.at}`,
103
104
  EventBusName: this.eventBusName,
104
105
  ScheduleExpression: `cron(${cronExpression})`,
105
106
  State: "ENABLED",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clairejs/server",
3
- "version": "3.21.3",
3
+ "version": "3.21.4",
4
4
  "description": "Claire server NodeJs framework written in Typescript.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",