• P
    LRANK: Add command (the command will be renamed LPOS). · a7936ef9
    Paul Spooren 提交于
    The `LRANK` command returns the index (position) of a given element
    within a list. Using the `direction` argument it is possible to specify
    going from head to tail (acending, 1) or from tail to head (decending,
    -1). Only the first found index is returend. The complexity is O(N).
    
    When using lists as a queue it can be of interest at what position a
    given element is, for instance to monitor a job processing through a
    work queue. This came up within the Python `rq` project which is based
    on Redis[0].
    
    [0]: https://github.com/rq/rq/issues/1197Signed-off-by: NPaul Spooren <mail@aparcar.org>
    a7936ef9
server.h 110.8 KB