@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 +1 -1
- package/dist/job/AwsJobScheduler.js +2 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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
|
-
|
|
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} - ${
|
|
101
|
+
Description: `${jobInfo.jobName} - ${cronExpression || jobInfo.at}`,
|
|
103
102
|
EventBusName: this.eventBusName,
|
|
104
103
|
ScheduleExpression: `cron(${cronExpression})`,
|
|
105
104
|
State: "ENABLED",
|