| 1681 | return response |
| 1682 | |
| 1683 | async def execute_command(self, *args: Any, **kwargs: Any) -> Any: |
| 1684 | # Acquire connection |
| 1685 | connection = self.acquire_connection() |
| 1686 | try: |
| 1687 | # Handle lazy disconnect for connections marked for reconnect |
| 1688 | await self.disconnect_if_needed(connection) |
| 1689 | |
| 1690 | # Execute command |
| 1691 | await connection.send_packed_command(connection.pack_command(*args)) |
| 1692 | |
| 1693 | # Read response |
| 1694 | return await self.parse_response(connection, args[0], **kwargs) |
| 1695 | finally: |
| 1696 | try: |
| 1697 | await self.disconnect_if_needed(connection) |
| 1698 | finally: |
| 1699 | # Release connection |
| 1700 | self.release(connection) |
| 1701 | |
| 1702 | async def execute_pipeline(self, commands: List["PipelineCommand"]) -> bool: |
| 1703 | # Acquire connection |