fix(core): Prevent shutdown error in regular mode (#10844)

This commit is contained in:
Iván Ovejero 2024-09-17 12:02:17 +02:00 committed by GitHub
parent 5a2c7e00a0
commit acb4194fa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,6 @@ import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus'
import { LogStreamingEventRelay } from '@/events/log-streaming-event-relay';
import { JobProcessor } from '@/scaling/job-processor';
import type { ScalingService } from '@/scaling/scaling.service';
import { WorkerServer } from '@/scaling/worker-server';
import { OrchestrationHandlerWorkerService } from '@/services/orchestration/worker/orchestration.handler.worker.service';
import { OrchestrationWorkerService } from '@/services/orchestration/worker/orchestration.worker.service';
import type { RedisServicePubSubSubscriber } from '@/services/redis/redis-service-pub-sub-subscriber';
@ -167,6 +166,7 @@ export class Worker extends BaseCommand {
this.globalConfig.queue.health.active ||
this.globalConfig.credentials.overwrite.endpoint !== ''
) {
const { WorkerServer } = await import('@/scaling/worker-server');
await Container.get(WorkerServer).init();
}