Closed inactivist closed 11 years ago
The mainline is deprecated and this should be a pull request for the beta-refactor branch.
https://github.com/agoragames/kairos/blob/beta-refactor/kairos/timeseries.py#L383
Re-opening because this is a feature we want, just not the patch on the old implementation.
I haven't yet had time to test the beta-refactor branch. I'll work up a pull request for that branch when I do.
Is this by design?
It would be useful to be able to record multiple 'hits' on a single item by calling
Timeseries.insert('item', count)
wherecount
> 1 -- web page hits being an example. I might want to record 10 or even 100 hits against a web page in a single.insert
call (as an optimization, to reduce communication overhead between the client and Redis.)Seems like a simple code change, give
value
a default value of 1 and include thevalue
parameter:pipe.incr(interval_key, value)
should do the trick.