Skip to content

Commit

Permalink
fix: terminate system should kill cortex process (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-menlo authored Aug 1, 2024
1 parent efa55f1 commit 49c428a
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit 49c428a

Please sign in to comment.