Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support returning time in pipelines #179

Merged
merged 1 commit into from Apr 6, 2020
Merged

Conversation

JeanMertz
Copy link
Contributor

Because now is defined on the MockRedis instance itself, it isn't captured in a "future" when capturing the pipelined block.

Before this change, the added test would return ['bar', 'baz'], instead of ['bar', [1_546_398_246, 0], 'baz'].

Moving now from MockRedis to Database was the simplest way to make this work given how the current futures implementation wraps around a database, which makes it cumbersome / non-idiomatic to capture data returned by the server itself.

I'm open to suggestions how we can make this more generic (i.e. any method on the server itself is captured, and we don't have to move this method to the database layer), without creating too much coupling between the different parts of the system (I don't think we want to start monkey patching the server within a pipelined scope?).

@sds sds added the enhancement label Apr 6, 2020
@sds sds merged commit 5ef8f8b into sds:master Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants