Cache service was not being loaded as running due to a name mismatch.
self._systemd_type,
)
)
- elif unit.name == "kres-cache-gc.service":
+ elif unit.name == systemd.GC_SERVICE_NAME:
# we can't easily check, if the unit is transient or not without additional systemd call
# we ignore it for now and assume the default persistency state. It shouldn't cause any
# problems, because interactions with the process are done the same way in all cases
logger = logging.getLogger(__name__)
+GC_SERVICE_NAME = "kres-managed-cache-gc.service"
+
class SystemdType(Enum):
SYSTEM = auto()
):
name, properties = {
SubprocessType.KRESD: (f"kresd_{kres_id}.service", _kresd_unit_properties(config, kres_id)),
- SubprocessType.GC: ("kres-managed-cache-gc.service", _gc_unit_properties(config)),
+ SubprocessType.GC: (GC_SERVICE_NAME, _gc_unit_properties(config)),
}[subprocess_type]
systemd = _create_manager_proxy(type_)
service, we can fix it. But we are not guaranteeing, that this will always work.
"""
- return web.Response(text="""
+ return web.Response(
+ text="""
<html>
<head><title>Redirect to schema viewer</title></head>
<body>
<h1>JavaScript required for a dynamic redirect...</h1>
</body>
</html>
- """, content_type="text/html")
+ """,
+ content_type="text/html",
+ )
def _set_log_level(self, config: KresConfig):
if self.log_level != config.server.management.log_level: