Skip to content

Commit

Permalink
Add "sum" to DUPLICATE_POLICY documentation of TS.CREATE, TS.ADD and …
Browse files Browse the repository at this point in the history
…TS.ALTER (#3027)
  • Loading branch information
Pedram-Parsian authored and dvora-h committed Feb 25, 2024
1 parent 9402c30 commit ab82697
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* Fix for Unhandled exception related to self.host with unix socket (#2496)
* Improve error output for master discovery
* Make `ClusterCommandsProtocol` an actual Protocol
* Add `sum` to DUPLICATE_POLICY documentation of `TS.CREATE`, `TS.ADD` and `TS.ALTER`

* 4.1.3 (Feb 8, 2022)
* Fix flushdb and flushall (#1926)
Expand Down
9 changes: 9 additions & 0 deletions redis/commands/timeseries/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def create(
- 'last': override with latest value.
- 'min': only override if the value is lower than the existing value.
- 'max': only override if the value is higher than the existing value.
- 'sum': If a previous sample exists, add the new sample to it so that \
the updated value is equal to (previous + new). If no previous sample \
exists, set the updated value equal to the new value.
For more information: https://redis.io/commands/ts.create/
""" # noqa
Expand Down Expand Up @@ -103,6 +106,9 @@ def alter(
- 'last': override with latest value.
- 'min': only override if the value is lower than the existing value.
- 'max': only override if the value is higher than the existing value.
- 'sum': If a previous sample exists, add the new sample to it so that \
the updated value is equal to (previous + new). If no previous sample \
exists, set the updated value equal to the new value.
For more information: https://redis.io/commands/ts.alter/
""" # noqa
Expand Down Expand Up @@ -154,6 +160,9 @@ def add(
- 'last': override with latest value.
- 'min': only override if the value is lower than the existing value.
- 'max': only override if the value is higher than the existing value.
- 'sum': If a previous sample exists, add the new sample to it so that \
the updated value is equal to (previous + new). If no previous sample \
exists, set the updated value equal to the new value.
For more information: https://redis.io/commands/ts.add/
""" # noqa
Expand Down

0 comments on commit ab82697

Please sign in to comment.