Grokzen / redis-py-cluster

Python cluster client for the official redis cluster. Redis 3.0+.
https://redis-py-cluster.readthedocs.io/
MIT License
1.1k stars 316 forks source link

could I get the value in pipeline? #439

Closed ucasiggcas closed 3 years ago

ucasiggcas commented 3 years ago

hi,dear when I run the down codes,I got the wrong thing,

>>> redis_obj=get_redis()
>>> with redis_obj.pipeline() as pipeline2:
...     key_feat=pipeline2.lrange('kdjdjo',0,100)
... 
>>> key_feat
ClusterPipeline

So why is the ClusterPipeline ? it should be a list in fact could you pls help me ?

ucasiggcas commented 3 years ago

another same bug!

>>> redis_obj.rpush('test',*[1,2,3,4,3])
5
>>> items0=[]
>>> redis_obj.lrange('test',0,10)
['1', '2', '3', '4', '3']
>>> with redis_obj.pipeline() as pipeline:
...     for i in range(7):
...             it=pipeline.lpop('test')
...             items0.append(it)
...     pipeline.execute()
>>> items0
[ClusterPipeline, ClusterPipeline, ClusterPipeline, ClusterPipeline, ClusterPipeline, ClusterPipeline, ClusterPipeline]

>>> it
ClusterPipeline

so what's the problem ?

Grokzen commented 3 years ago

@ucasiggcas This section is for reporting reproducible issues and not for asking for general help with your code. To get help with your code and ask general questions i refer you to either ask them on stackoverflow or in the Discussions tab in this git repo, not in here.