Bases: BaseCommand
Mixin for Redis message publishing commands (PUBLISH).
Source code in pyredis/commands/publish.py
4
5
6
7
8
9
10
11
12
13
14
15 | class Publish(BaseCommand):
"""Mixin for Redis message publishing commands (PUBLISH)."""
def __init__(self):
super().__init__()
def publish(self, *args):
if self._cluster:
raise NotImplementedError
return self.execute(
*[b"PUBLISH", *args]
)
|
__init__()
Source code in pyredis/commands/publish.py
| def __init__(self):
super().__init__()
|
execute(*args, **kwargs)
Source code in pyredis/commands/base.py
| def execute(self, *args, **kwargs):
raise NotImplementedError
|
publish(*args)
Source code in pyredis/commands/publish.py
| def publish(self, *args):
if self._cluster:
raise NotImplementedError
return self.execute(
*[b"PUBLISH", *args]
)
|