Repository: LMCache/LMCache
File: lmcache/v1/plugin/runtime_plugin_launcher.py (Python)

Code before:
logger = init_logger(__name__)


class RuntimePluginLauncher:
    def __init__(self, config, role, worker_count, worker_id):
        self.config = config
        self.role = role
        self.worker_count = worker_count
        self.worker_id = worker_id
        self.plugin_processes = []
        # Register cleanup handler
        atexit.register(self.stop_plugins)

    def launch_plugins(self):
        """Launch all configured plugins"""
        if not self.config.runtime_plugin_locations:
            return

        for loc in self.config.runtime_plugin_locations:
            self._launch_plugins(loc)

    def _launch_plugins(self, loc: str):
        """Launch plugins from specified location"""
        path = Path(loc)
        if not path.exists():
            logger.warning(f"Runrime plugin location {loc} does not exist")
            return

        files = []
        if path.is_file():
            files = [path]
        elif path.is_dir():
            # Recursively find all .py and .sh files
            for ext in ["*.py", "*.sh"]:
                files.extend(path.rglob(ext))

        for file in files:
            self._launch_plugin(file)

    def _should_skip_plugin(self, file: Path, parts: list[str]) -> bool:
        """Determine if plugin should be skipped based on role/worker ID"""
        if len(parts) < 2:
            return False

        # Check role match
        plugin_role = parts[0].upper()
        if plugin_role != "ALL" and plugin_role != self.role.name:
            logger.info(f"Skipping {file}: requires role {plugin_role}")
            return True

        # Check worker ID match

Review comment (suggestion):
```suggestion
            logger.warning(f"Runtime plugin location {loc} does not exist")
```

Code after:
logger = init_logger(__name__)


class RuntimePluginLauncher:
    def __init__(self, config, role, worker_count, worker_id):
        self.config = config
        self.role = role
        self.worker_count = worker_count
        self.worker_id = worker_id
        self.plugin_processes = []
        # Register cleanup handler
        atexit.register(self.stop_plugins)

    def launch_plugins(self):
        """Launch all configured plugins"""
        if not self.config.runtime_plugin_locations:
            return

        for loc in self.config.runtime_plugin_locations:
            self._launch_plugins(loc)

    def _launch_plugins(self, loc: str):
        """Launch plugins from specified location"""
        path = Path(loc)
        if not path.exists():
            logger.warning(f"Runtime plugin location {loc} does not exist")
            return

        files = []
        if path.is_file():
            files = [path]
        elif path.is_dir():
            # Recursively find all .py and .sh files
            for ext in ["*.py", "*.sh"]:
                files.extend(path.rglob(ext))

        for file in files:
            self._launch_plugin(file)

    def _should_skip_plugin(self, file: Path, parts: list[str]) -> bool:
        """Determine if plugin should be skipped based on role/worker ID"""
        if len(parts) < 2:
            return False

        # Check role match
        plugin_role = parts[0].upper()
        if plugin_role != "ALL" and plugin_role != self.role.name:
            logger.info(f"Skipping {file}: requires role {plugin_role}")
            return True

        # Check worker ID match