fix(core): Fix init for AuditEventRelay (#9839)

This commit is contained in:
Iván Ovejero 2024-06-24 10:51:34 +02:00 committed by GitHub
parent b807e6726f
commit 16d3083af7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -66,6 +66,7 @@ import '@/ExternalSecrets/ExternalSecrets.controller.ee';
import '@/license/license.controller'; import '@/license/license.controller';
import '@/workflows/workflowHistory/workflowHistory.controller.ee'; import '@/workflows/workflowHistory/workflowHistory.controller.ee';
import '@/workflows/workflows.controller'; import '@/workflows/workflows.controller';
import { AuditEventRelay } from './eventbus/audit-event-relay.service';
const exec = promisify(callbackExec); const exec = promisify(callbackExec);
@ -252,6 +253,7 @@ export class Server extends AbstractServer {
// ---------------------------------------- // ----------------------------------------
const eventBus = Container.get(MessageEventBus); const eventBus = Container.get(MessageEventBus);
await eventBus.initialize(); await eventBus.initialize();
Container.get(AuditEventRelay).init();
if (this.endpointPresetCredentials !== '') { if (this.endpointPresetCredentials !== '') {
// POST endpoint to set preset credentials // POST endpoint to set preset credentials

View file

@ -10,7 +10,9 @@ export class AuditEventRelay {
constructor( constructor(
private readonly eventRelay: EventRelay, private readonly eventRelay: EventRelay,
private readonly eventBus: MessageEventBus, private readonly eventBus: MessageEventBus,
) { ) {}
init() {
this.setupHandlers(); this.setupHandlers();
} }