(
self, connection: Connection, commands: CommandStackT, raise_on_error: bool
)
| 1944 | return data |
| 1945 | |
| 1946 | async def _execute_pipeline( |
| 1947 | self, connection: Connection, commands: CommandStackT, raise_on_error: bool |
| 1948 | ): |
| 1949 | # build up all commands into a single request to increase network perf |
| 1950 | all_cmds = connection.pack_commands([args for args, _ in commands]) |
| 1951 | await connection.send_packed_command(all_cmds) |
| 1952 | |
| 1953 | response = [] |
| 1954 | for args, options in commands: |
| 1955 | try: |
| 1956 | response.append( |
| 1957 | await self.parse_response(connection, args[0], **options) |
| 1958 | ) |
| 1959 | except ResponseError as e: |
| 1960 | response.append(e) |
| 1961 | |
| 1962 | if raise_on_error: |
| 1963 | self.raise_first_error(commands, response) |
| 1964 | return response |
| 1965 | |
| 1966 | def raise_first_error(self, commands: CommandStackT, response: Iterable[Any]): |
| 1967 | for i, r in enumerate(response): |
nothing calls this directly
no test coverage detected