Skip to content

Conversation

@sirnicolaz
Copy link
Contributor

Just a small utility to use a pipeline in a controlled with block, like

import redis
from utils import pipeline

r = redis.StrictRedis(host='localhost', port=6379, db=0)

with pipeline(r) as p:
      p.set("foo", "bar")
      p.set("answer", 42)

Around the block, it's going to instantiate the pipeline and then execute it.

@andymccurdy
Copy link
Contributor

Thanks!

andymccurdy added a commit that referenced this pull request Nov 27, 2013
Add utility for pipelining within 'with' statement.
@andymccurdy andymccurdy merged commit b2101d3 into redis:master Nov 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants