add another helper method to rented instance data class
This commit is contained in:
parent
2fc83c4d5b
commit
a559f433db
1 changed files with 8 additions and 0 deletions
|
@ -73,6 +73,14 @@ data class RentedInstance(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gpu model or label if set
|
||||||
|
* @return instance name
|
||||||
|
*/
|
||||||
|
fun getName(): String {
|
||||||
|
return label ?: instance.machine.gpu.model
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns whether the instance is running
|
* returns whether the instance is running
|
||||||
* this is true also if the instance is stopping
|
* this is true also if the instance is stopping
|
||||||
|
|
Loading…
Reference in a new issue