File tree Expand file tree Collapse file tree
apps/meteor/ee/server/apps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ export class AppServerOrchestrator {
122122 }
123123
124124 getProvidedComponents ( ) {
125+ if ( ! this . isLoaded ( ) ) {
126+ return ;
127+ }
128+
125129 return this . _manager . getExternalComponentManager ( ) . getProvidedComponents ( ) ;
126130 }
127131
@@ -134,7 +138,7 @@ export class AppServerOrchestrator {
134138 }
135139
136140 isLoaded ( ) {
137- return this . getManager ( ) . areAppsLoaded ( ) ;
141+ return this . isInitialized ( ) && this . getManager ( ) . areAppsLoaded ( ) ;
138142 }
139143
140144 isDebugging ( ) {
@@ -161,7 +165,7 @@ export class AppServerOrchestrator {
161165 async load ( ) {
162166 // Don't try to load it again if it has
163167 // already been loaded
164- if ( this . isLoaded ( ) ) {
168+ if ( ! this . isInitialized ( ) || this . isLoaded ( ) ) {
165169 return ;
166170 }
167171
Original file line number Diff line number Diff line change 11import type { Db } from 'mongodb' ;
22
33import { settings } from '../../../../app/settings/server' ;
4- import { AppServerOrchestrator } from '../orchestrator' ;
4+ import type { AppServerOrchestrator } from '../orchestrator' ;
5+ import { Apps } from '../orchestrator' ;
56
67type AppsInitParams = {
78 appsSourceStorageFilesystemPath : any ;
@@ -10,7 +11,7 @@ type AppsInitParams = {
1011} ;
1112
1213export class OrchestratorFactory {
13- private static orchestrator : AppServerOrchestrator ;
14+ private static orchestrator : AppServerOrchestrator = Apps ;
1415
1516 private static createOrchestrator ( _db : Db ) {
1617 const appsInitParams : AppsInitParams = {
@@ -19,7 +20,6 @@ export class OrchestratorFactory {
1920 marketplaceUrl : 'https://marketplace.rocket.chat' ,
2021 } ;
2122
22- this . orchestrator = new AppServerOrchestrator ( ) ;
2323 // this.orchestrator = new AppServerOrchestrator(db);
2424
2525 const { OVERWRITE_INTERNAL_MARKETPLACE_URL } = process . env || { } ;
@@ -28,7 +28,6 @@ export class OrchestratorFactory {
2828 appsInitParams . marketplaceUrl = OVERWRITE_INTERNAL_MARKETPLACE_URL ;
2929 }
3030
31- this . orchestrator . initialize ( ) ;
3231 // this.orchestrator.initialize(appsInitParams);
3332 }
3433
You can’t perform that action at this time.
0 commit comments