@wabot-dev/framework 0.5.11 → 0.5.13
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.
|
@@ -60,7 +60,9 @@ let CronScheduler = class CronScheduler {
|
|
|
60
60
|
this.logger.debug(`start reconciliation of crons ${configToReconciliate.map((x) => x.name).join(', ')}`);
|
|
61
61
|
try {
|
|
62
62
|
const cronJobs = await Promise.all(configToReconciliate.map((x) => this.reconciliateConfig(x)));
|
|
63
|
-
|
|
63
|
+
for (const cronJob of cronJobs) {
|
|
64
|
+
this.logger.info(`config CRON ${cronJob.name} ${cronJob.schedule}`);
|
|
65
|
+
}
|
|
64
66
|
this.jobScheduler.start(cronJobs.map((x) => x.commandName));
|
|
65
67
|
this.jobWatchdog.start(cronJobs.map((x) => x.commandName));
|
|
66
68
|
}
|
|
@@ -126,7 +128,7 @@ let CronScheduler = class CronScheduler {
|
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
await this.cronRepo.update(fresh);
|
|
129
|
-
this.logger.info(`Cron ${fresh.
|
|
131
|
+
this.logger.info(`Cron ${fresh.name} spawned ${executions} job(s), next at ${fresh.nextRunAt.toISOString()}`);
|
|
130
132
|
});
|
|
131
133
|
}
|
|
132
134
|
async reconciliateConfig(config) {
|
|
@@ -23,7 +23,9 @@ let JobScheduler = class JobScheduler {
|
|
|
23
23
|
}
|
|
24
24
|
start(commands) {
|
|
25
25
|
commands.forEach((x) => this.commands.add(x));
|
|
26
|
-
|
|
26
|
+
for (const command of commands) {
|
|
27
|
+
this.logger.info(`config COMMAND ${command}`);
|
|
28
|
+
}
|
|
27
29
|
if (this.commands.size > 0 && !this.running) {
|
|
28
30
|
this.running = true;
|
|
29
31
|
this.tick();
|
package/dist/src/index.d.ts
CHANGED
|
@@ -604,6 +604,7 @@ interface ICronJobData extends IEntityData {
|
|
|
604
604
|
}
|
|
605
605
|
declare class CronJob extends Entity<ICronJobData> {
|
|
606
606
|
constructor(data: ICronJobData);
|
|
607
|
+
get schedule(): string;
|
|
607
608
|
get nextRunAt(): Date | null;
|
|
608
609
|
get lastRunAt(): Date | null;
|
|
609
610
|
get maxConcurrency(): number;
|