add another helper method to rented instance data class

This commit is contained in:
Minecon724 2024-08-08 14:05:43 +02:00
parent 2fc83c4d5b
commit a559f433db
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -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
* this is true also if the instance is stopping