Skip to content

Commit

Permalink
feat: isRunning
Browse files Browse the repository at this point in the history
  • Loading branch information
akastercomcom committed Sep 20, 2023
1 parent 3262d40 commit fbf5971
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/modelController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fbf5971

Please sign in to comment.