Skip to content

Commit

Permalink
regression: fix initializing startup order (#30555)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Oct 3, 2023
1 parent c0ef13a commit 1065cd8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 0 additions & 2 deletions apps/meteor/ee/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import './startup';

import '../app/license/server/index';
import '../app/api-enterprise/server/index';
import '../app/authorization/server/index';
Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/server/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import './importPackages';
import '../imports/startup/server';
import '../app/lib/server/startup';

import '../ee/server/startup';
import './startup';
import '../ee/server';
import './lib/pushConfig';
import './startup';
import './configuration/accounts_meld';
import './configuration/ldap';
import './methods/OEmbedCacheCleanup';
Expand Down
3 changes: 3 additions & 0 deletions ee/packages/presence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"files": [
"/dist"
],
"volta": {
"extends": "../../../package.json"
},
"dependencies": {
"@rocket.chat/core-services": "workspace:^",
"@rocket.chat/core-typings": "workspace:^",
Expand Down
3 changes: 3 additions & 0 deletions packages/core-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"files": [
"/dist"
],
"volta": {
"extends": "../../package.json"
},
"dependencies": {
"@rocket.chat/apps-engine": "1.41.0-alpha.290",
"@rocket.chat/core-typings": "workspace:^",
Expand Down
6 changes: 5 additions & 1 deletion packages/core-services/src/lib/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export class Api implements IApiService {
}

async broadcast<T extends keyof EventSignatures>(event: T, ...args: Parameters<EventSignatures[T]>): Promise<void> {
return this.broker?.broadcast(event, ...args);
if (!this.broker) {
throw new Error(`No broker set to broadcast: ${event}`);
}

return this.broker.broadcast(event, ...args);
}

async broadcastToServices<T extends keyof EventSignatures>(
Expand Down

0 comments on commit 1065cd8

Please sign in to comment.