diff --git a/runner_manager/models/runner_group.py b/runner_manager/models/runner_group.py index 6eab5f73..927998a9 100644 --- a/runner_manager/models/runner_group.py +++ b/runner_manager/models/runner_group.py @@ -313,16 +313,6 @@ def healthcheck( ): """Healthcheck runner group.""" runners = self.get_runners() - backend_runners = self.backend.list() - # Check if there's a runner that is not in the database - if len(runners) != len(backend_runners): - for backend_runner in backend_runners: - if backend_runner not in runners: - # A runner has leaked from the database/runner manager - # let's save it and add it to the list of runners - backend_runner.save() - runners.append(backend_runner) - for runner in runners: runner.update_from_github(github) if runner.time_to_live_expired(time_to_live): diff --git a/tests/unit/jobs/test_healthchecks.py b/tests/unit/jobs/test_healthchecks.py index 7f8a550b..01a65074 100644 --- a/tests/unit/jobs/test_healthchecks.py +++ b/tests/unit/jobs/test_healthchecks.py @@ -2,6 +2,7 @@ from hypothesis import given, settings from hypothesis import strategies as st +from pytest import mark from redis_om import Migrator from rq import Queue @@ -136,6 +137,7 @@ def test_healthcheck_job( assert len(runner_group.get_runners()) == 1 +@mark.skip(reason="The check was reverted due to killing healthy runners") def test_healthcheck_backend_leak( runner_group: RunnerGroup, settings: Settings,