Start a transactional block of the pipeline after WATCH commands are issued. End the transactional block with `execute`.
(self)
| 1748 | self.reset() |
| 1749 | |
| 1750 | def multi(self) -> None: |
| 1751 | """ |
| 1752 | Start a transactional block of the pipeline after WATCH commands |
| 1753 | are issued. End the transactional block with `execute`. |
| 1754 | """ |
| 1755 | if self.explicit_transaction: |
| 1756 | raise RedisError("Cannot issue nested calls to MULTI") |
| 1757 | if self.command_stack: |
| 1758 | raise RedisError( |
| 1759 | "Commands without an initial WATCH have already been issued" |
| 1760 | ) |
| 1761 | self.explicit_transaction = True |
| 1762 | |
| 1763 | def execute_command(self, *args, **kwargs): |
| 1764 | if (self.watching or args[0] == "WATCH") and not self.explicit_transaction: |