diff --git a/github_app_geo_project/module/audit/__init__.py b/github_app_geo_project/module/audit/__init__.py index 05a9c9d19d8..2f364436606 100644 --- a/github_app_geo_project/module/audit/__init__.py +++ b/github_app_geo_project/module/audit/__init__.py @@ -13,7 +13,6 @@ import c2cciutils.security import github -import markdown import yaml from pydantic import BaseModel diff --git a/github_app_geo_project/scripts/process_queue.py b/github_app_geo_project/scripts/process_queue.py index aee8c3bd5f3..eed7d734659 100644 --- a/github_app_geo_project/scripts/process_queue.py +++ b/github_app_geo_project/scripts/process_queue.py @@ -687,7 +687,7 @@ async def _process_one_job( job.status = models.JobStatus.PENDING job.started_at = datetime.datetime.now(tz=datetime.timezone.utc) session.commit() - _NB_JOBS.labels(models.JobStatus.PENDING).set( + _NB_JOBS.labels(models.JobStatus.PENDING.name).set( session.query(models.Queue).filter(models.Queue.status == models.JobStatus.PENDING).count() ) @@ -803,6 +803,7 @@ async def __call__(self, *args: Any, **kwds: Any) -> Any: def _watch(self) -> None: while True: + _LOGGER.debug("Prometheus watch: alive") with self.Session() as session: for status in models.JobStatus: _NB_JOBS.labels(status.name).set(