async with self._manager_lock:
await self._ensure_number_of_children(KresConfig(), 0)
+ if self._gc is not None:
+ await self._stop_gc()
await self._controller.shutdown_controller()
async def _instability_handler(self) -> None:
@property
def systemd_id(self) -> str:
if self._type is SubprocessType.GC:
- return "kres-cache-gc.service"
+ return systemd.GC_SERVICE_NAME
else:
return f"kresd_{self._id}.service"
@staticmethod
def is_unit_name_ours(unit_name: str) -> bool:
- is_ours = unit_name == "kres-cache-gc.service"
+ is_ours = unit_name == systemd.GC_SERVICE_NAME
is_ours |= unit_name.startswith("kresd_") and unit_name.endswith(".service")
return is_ours