Skip to content

Commit eefe3ab

Browse files
Add "sum" to DUPLICATE_POLICY documentation of TS.CREATE, TS.ADD and TS.ALTER (#3027)
1 parent ac92e0c commit eefe3ab

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGES

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
* Fix for Unhandled exception related to self.host with unix socket (#2496)
5757
* Improve error output for master discovery
5858
* Make `ClusterCommandsProtocol` an actual Protocol
59+
* Add `sum` to DUPLICATE_POLICY documentation of `TS.CREATE`, `TS.ADD` and `TS.ALTER`
5960

6061
* 4.1.3 (Feb 8, 2022)
6162
* Fix flushdb and flushall (#1926)

redis/commands/timeseries/commands.py

+9
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def create(
5959
- 'last': override with latest value.
6060
- 'min': only override if the value is lower than the existing value.
6161
- 'max': only override if the value is higher than the existing value.
62+
- 'sum': If a previous sample exists, add the new sample to it so that \
63+
the updated value is equal to (previous + new). If no previous sample \
64+
exists, set the updated value equal to the new value.
6265
6366
For more information: https://redis.io/commands/ts.create/
6467
""" # noqa
@@ -103,6 +106,9 @@ def alter(
103106
- 'last': override with latest value.
104107
- 'min': only override if the value is lower than the existing value.
105108
- 'max': only override if the value is higher than the existing value.
109+
- 'sum': If a previous sample exists, add the new sample to it so that \
110+
the updated value is equal to (previous + new). If no previous sample \
111+
exists, set the updated value equal to the new value.
106112
107113
For more information: https://redis.io/commands/ts.alter/
108114
""" # noqa
@@ -154,6 +160,9 @@ def add(
154160
- 'last': override with latest value.
155161
- 'min': only override if the value is lower than the existing value.
156162
- 'max': only override if the value is higher than the existing value.
163+
- 'sum': If a previous sample exists, add the new sample to it so that \
164+
the updated value is equal to (previous + new). If no previous sample \
165+
exists, set the updated value equal to the new value.
157166
158167
For more information: https://redis.io/commands/ts.add/
159168
""" # noqa

0 commit comments

Comments
 (0)