dealing with some edge cases and documenting the new WATCH functionality #34

Merged
merged 1 commit into from Dec 21, 2012

Conversation

Projects
None yet
2 participants
Contributor

dgvncsz0f commented Dec 21, 2012

This patch deals with the following scenarios, which would ended up
cleaning the inTransaction prematurely:

  1. UNWATCH after MULTI

    t = multi
    t.unwatch

  2. WATCH, MULTI (with keys)

    t = watch
    t.multi("foobar")
    t.unwatch

3 . MULTI + WATCH

t = multi
t.watch # this is invalid, but
will change the _unwatch_cc
to a function that would clear
the inTransaction state

I've also dropped a couple more tests, notably testing WATCH with ConnectionPool.

@dgvncsz0f dgvncsz0f dealing with some edge cases and documenting the new WATCH functionality
This patch deals with the following scenarios, which would ended up
cleaning the inTransaction prematurely:

1. UNWATCH after MULTI

  t = multi
  t.unwatch

2. WATCH, MULTI (with keys)

  t = watch
  t.multi("foobar")
  t.unwatch

3 . MULTI + WATCH

  t = multi
  t.watch   # this is invalid, but
              will change the _unwatch_cc
              to a function that would clear
              the inTransaction state

I've also dropped a couple more tests, notably testing WATCH with ConnectionPool.
34b3adb
Contributor

dgvncsz0f commented Dec 21, 2012

Probably these cases will never show up in production code, but better fix them before ruining someones day :-)

@gleicon gleicon added a commit that referenced this pull request Dec 21, 2012

@gleicon gleicon Merge pull request #34 from dgvncsz0f/master
dealing with some edge cases and documenting the new WATCH functionality
20b55ff

@gleicon gleicon merged commit 20b55ff into fiorix:master Dec 21, 2012

1 check passed

default The Travis build passed
Details
Collaborator

gleicon commented Dec 21, 2012

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment