From fbf5971f880d617bbab2f1402ca0b4c0b0042bcf Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 20 Sep 2023 14:06:41 +0900 Subject: [PATCH] feat: isRunning --- src/controllers/modelController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/modelController.ts b/src/controllers/modelController.ts index dd90643..91c5f7b 100644 --- a/src/controllers/modelController.ts +++ b/src/controllers/modelController.ts @@ -19,7 +19,9 @@ export default class ModelController { async isRunning(modelName: string) { const isRunning = await this.ain.getValue(Path.app(modelName).status()); - return isRunning === ContainerStatus.RUNNING; + if(isRunning !== ContainerStatus.RUNNING) { + throw new Error('Model is not running'); + } } //TODO(woojae): implement this