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