Skip to content

Instantly share code, notes, and snippets.

@cararemixed
Created December 17, 2010 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cararemixed/745841 to your computer and use it in GitHub Desktop.
Save cararemixed/745841 to your computer and use it in GitHub Desktop.
Redis transactions
def transaction
# pre transaction
REDIS.MULTI
# transaction
rescue
REDIS.DISCARD
# transaction failure
raise
else
REDIS.EXEC
# post transaction
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment