Start scheduler after apps have been loaded (#23566)

pull/23618/head
Douglas Gubert 4 years ago committed by GitHub
parent 7af515f700
commit b092bef813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/apps/server/bridges/scheduler.ts
  2. 3
      app/apps/server/orchestrator.js

@ -198,7 +198,7 @@ export class AppSchedulerBridge extends SchedulerBridge {
}
}
private async startScheduler(): Promise<void> {
public async startScheduler(): Promise<void> {
if (!this.isConnected) {
await this.scheduler.start();
this.isConnected = true;

@ -158,7 +158,8 @@ export class AppServerOrchestrator {
return this._manager.load()
.then((affs) => console.log(`Loaded the Apps Framework and loaded a total of ${ affs.length } Apps!`))
.catch((err) => console.warn('Failed to load the Apps Framework and Apps!', err));
.catch((err) => console.warn('Failed to load the Apps Framework and Apps!', err))
.then(() => this.getBridges().getSchedulerBridge().startScheduler());
}
async unload() {

Loading…
Cancel
Save