Skip to content

Commit

Permalink
Remove unworking info
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 24, 2024
1 parent 8e3f57b commit c025123
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions github_app_geo_project/scripts/process_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
_LOGGER_WSGI = logging.getLogger("prometheus_client.wsgi")

_NB_JOBS = Gauge("ghci_jobs_number", "Number of jobs", ["status"])
_JOBS = Info("ghci_jobs", "Running jobs")


class _JobInfo(NamedTuple):
Expand Down Expand Up @@ -810,25 +809,19 @@ def _watch(self) -> None:
_NB_JOBS.labels(status.name).set(
session.query(models.Queue).filter(models.Queue.status == status).count()
)
info = {}
text = []
for id_, job in _RUNNING_JOBS.items():
text.append(
f"{id_}: {job.module} {job.event_name} {job.repository} [{job.priority}] (Worker max priority {job.worker_max_priority})"
)
info[f"job-id-{id_}"] = (
f"{job.module} {job.event_name} {job.repository} [{job.priority}] (Worker max priority {job.worker_max_priority})"
)
try:
for task in asyncio.all_tasks():
txt = io.StringIO()
task.print_stack(file=txt)
text.append("-" * 30)
text.append(txt.getvalue())
info[f"task-{id(task)}"] = txt.getvalue()
except RuntimeError as exception:
text.append(str(exception))
_JOBS.info(info)

if time.time() - self.last_run > 300:
error_message = ["Old Status"]
Expand Down

0 comments on commit c025123

Please sign in to comment.