@clairejs/server 3.21.1 → 3.21.2

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.1:
3
+ #### 3.21.2:
4
4
 
5
5
  - add log to aws job scheduler & fix cronjob sync
6
6
  - simplify lambda job scheduler, remove job interval that is less than 60s
@@ -142,17 +142,17 @@ let AwsJobScheduler = class AwsJobScheduler extends AbstractJobScheduler {
142
142
  const unmatchedCronJobs = scheduledCronJobs.filter((j) => j.cron && !allJobs.find((job) => job.jobName === j.jobName && job.cron === j.cron));
143
143
  if (unmatchedCronJobs.length) {
144
144
  await Promise.all(unmatchedCronJobs.map((j) => this.removeJob(j.id)));
145
- //-- reschedule new cron jobs and those which are not synced
146
- const resyncCronJobs = allJobs.filter((job) => job.cron &&
147
- (unmatchedCronJobs.some((j) => j.jobName === job.jobName) ||
148
- !scheduledCronJobs.some((j) => j.jobName === job.jobName)));
149
- this.logger.debug("Reschedule cron jobs", resyncCronJobs);
150
- for (const job of resyncCronJobs) {
151
- await this.scheduleJob({
152
- jobName: job.jobName,
153
- cron: job.cron,
154
- });
155
- }
145
+ }
146
+ //-- reschedule new cron jobs and those which are not synced
147
+ const resyncCronJobs = allJobs.filter((job) => job.cron &&
148
+ (unmatchedCronJobs.some((j) => j.jobName === job.jobName) ||
149
+ !scheduledCronJobs.some((j) => j.jobName === job.jobName)));
150
+ this.logger.debug("Reschedule cron jobs", resyncCronJobs);
151
+ for (const job of resyncCronJobs) {
152
+ await this.scheduleJob({
153
+ jobName: job.jobName,
154
+ cron: job.cron,
155
+ });
156
156
  }
157
157
  //-- keep "at" jobs as is
158
158
  console.log("syncJobs finished");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clairejs/server",
3
- "version": "3.21.1",
3
+ "version": "3.21.2",
4
4
  "description": "Claire server NodeJs framework written in Typescript.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",