mirror of
https://gitlab.com/itsulu-odoo/runboat.git
synced 2026-05-30 23:41:27 +00:00
Add stopped count to controller status api
This commit is contained in:
parent
b17e639572
commit
256f828e97
2 changed files with 5 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ router = APIRouter()
|
|||
class Status(BaseModel):
|
||||
deployed: int
|
||||
max_deployed: int
|
||||
stopped: int
|
||||
started: int
|
||||
max_started: int
|
||||
to_initialize: int
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ class Controller:
|
|||
if event == BuildEvent.modified and build.status == BuildStatus.undeploying:
|
||||
self._wakeup_cleaner.set()
|
||||
|
||||
@property
|
||||
def stopped(self) -> int:
|
||||
return self.db.count_by_status(BuildStatus.stopped)
|
||||
|
||||
@property
|
||||
def started(self) -> int:
|
||||
return self.db.count_by_status(BuildStatus.started)
|
||||
|
|
|
|||
Loading…
Reference in a new issue