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):
|
class Status(BaseModel):
|
||||||
deployed: int
|
deployed: int
|
||||||
max_deployed: int
|
max_deployed: int
|
||||||
|
failed: int
|
||||||
stopped: int
|
stopped: int
|
||||||
started: int
|
started: int
|
||||||
max_started: int
|
max_started: int
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,10 @@ class Controller:
|
||||||
def stopped(self) -> int:
|
def stopped(self) -> int:
|
||||||
return self.db.count_by_status(BuildStatus.stopped)
|
return self.db.count_by_status(BuildStatus.stopped)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def failed(self) -> int:
|
||||||
|
return self.db.count_by_status(BuildStatus.failed)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def started(self) -> int:
|
def started(self) -> int:
|
||||||
return self.db.count_by_status(BuildStatus.started)
|
return self.db.count_by_status(BuildStatus.started)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue