@clairejs/server 3.21.3 → 3.21.5

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.5:
4
4
 
5
5
  - fix cron expression
6
6
  - add log to aws job scheduler & fix cronjob sync
@@ -82,7 +82,6 @@ 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) {
88
87
  cronExpression = this.generateCronFromTimestamp(jobInfo.at);
@@ -90,7 +89,7 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
90
89
  else if (jobInfo.cron) {
91
90
  let cron = jobInfo.cron;
92
91
  if (cron.endsWith(" *")) {
93
- cronExpression = `${cron.slice(0, -2)} ?`;
92
+ cron = `${cron.slice(0, -2)} ?`;
94
93
  }
95
94
  cronExpression = `${cron} *`;
96
95
  }
@@ -99,7 +98,7 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
99
98
  await this.eventbridge
100
99
  .putRule({
101
100
  Name: jobId,
102
- Description: `${jobInfo.jobName} - ${jobInfo.cron || jobInfo.at}`,
101
+ Description: `${jobInfo.jobName} - ${cronExpression || jobInfo.at}`,
103
102
  EventBusName: this.eventBusName,
104
103
  ScheduleExpression: `cron(${cronExpression})`,
105
104
  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.5",
4
4
  "description": "Claire server NodeJs framework written in Typescript.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",