fix(core): update

This commit is contained in:
2023-08-13 09:37:23 +02:00
parent d04ed21607
commit 6499dd45cf
3 changed files with 12 additions and 3 deletions

View File

@@ -121,11 +121,17 @@ export class TaskManager {
return task && task.cronJob ? task.cronJob.cronExpression : null;
}
public start() {
public async start() {
if (this.options.distributedCoordinator) {
await this.options.distributedCoordinator.start();
}
this.cronJobManager.start();
}
public stop() {
public async stop() {
this.cronJobManager.stop();
if (this.options.distributedCoordinator) {
await this.options.distributedCoordinator.stop();
}
}
}