def is_running(self) -> bool:
        """Check if the server is currently running."""
        # Check if process from instance is running
        if self._process and self._process.poll() is None:
            return True

        # Check if process from PID file is running
        pid = self._manage_pid_file("read")
        if pid:
            try:
                process = psutil.Process(pid)
                return process.is_running() and process.name().startswith("python")
            except psutil.NoSuchProcess:
                self._manage_pid_file("cleanup")
                
        return False
Check if the server is currently running.
src/upsonic/server_manager.py