MCPcopy
hub / github.com/redis/redis-py / multi

Method multi

redis/client.py:1750–1761  ·  view source on GitHub ↗

Start a transactional block of the pipeline after WATCH commands are issued. End the transactional block with `execute`.

(self)

Source from the content-addressed store, hash-verified

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:

Calls 1

RedisErrorClass · 0.90