Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cortex-js/src/infrastructure/controllers/system.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ import {
} from 'rxjs';
import { ResourcesManagerService } from '../services/resources-manager/resources-manager.service';
import { ResourceEvent } from '@/domain/models/resource.interface';
import { CortexUsecases } from '@/usecases/cortex/cortex.usecases';

@ApiTags('System')
@Controller('system')
export class SystemController {
constructor(
private readonly downloadManagerService: DownloadManagerService,
private readonly modelsUsecases: ModelsUsecases,
private readonly cortexUsecases: CortexUsecases,
private readonly eventEmitter: EventEmitter2,
private readonly resourcesManagerService: ResourcesManagerService,
) {}
Expand All @@ -47,6 +49,7 @@ export class SystemController {
})
@Delete()
async delete() {
await this.cortexUsecases.stopCortex().catch(() => {});
process.exit(0);
}

Expand Down