Skip to content

Commit

Permalink
Add Prometheus watch debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 20, 2024
1 parent 9a6d7a0 commit aa3f087
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion github_app_geo_project/module/audit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import c2cciutils.security
import github
import markdown
import yaml
from pydantic import BaseModel

Expand Down
3 changes: 2 additions & 1 deletion github_app_geo_project/scripts/process_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit aa3f087

Please sign in to comment.