Add failed count
This commit is contained in:
parent
0700a21a26
commit
af7fb32a5e
2 changed files with 5 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ router = APIRouter()
|
|||
class Status(BaseModel):
|
||||
deployed: int
|
||||
max_deployed: int
|
||||
failed: int
|
||||
stopped: int
|
||||
started: int
|
||||
max_started: int
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ class Controller:
|
|||
def stopped(self) -> int:
|
||||
return self.db.count_by_status(BuildStatus.stopped)
|
||||
|
||||
@property
|
||||
def failed(self) -> int:
|
||||
return self.db.count_by_status(BuildStatus.failed)
|
||||
|
||||
@property
|
||||
def started(self) -> int:
|
||||
return self.db.count_by_status(BuildStatus.started)
|
||||
|
|
|
|||
Loading…
Reference in a new issue