diff options
author | George Goldberg <george@gberg.me> | 2018-02-19 11:19:39 +0000 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2018-02-19 11:19:39 +0000 |
commit | f8289eb286d00c29859a8df495b957c7b46cb249 (patch) | |
tree | 1bc18d6a3a795482c7229786f7ab427fabbcd007 /vendor/github.com/go-redis/redis/tx.go | |
parent | 8891fa2a5e9e08eb9fa99ec163c47a6e9761a816 (diff) | |
parent | 30197584d5a215a3b25bffa79a034ed9e360cf52 (diff) | |
download | chat-f8289eb286d00c29859a8df495b957c7b46cb249.tar.gz chat-f8289eb286d00c29859a8df495b957c7b46cb249.tar.bz2 chat-f8289eb286d00c29859a8df495b957c7b46cb249.zip |
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'vendor/github.com/go-redis/redis/tx.go')
-rw-r--r-- | vendor/github.com/go-redis/redis/tx.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/github.com/go-redis/redis/tx.go b/vendor/github.com/go-redis/redis/tx.go index 11d5d5cb0..26c29bef5 100644 --- a/vendor/github.com/go-redis/redis/tx.go +++ b/vendor/github.com/go-redis/redis/tx.go @@ -5,7 +5,7 @@ import ( "github.com/go-redis/redis/internal/pool" ) -// Redis transaction failed. +// TxFailedErr transaction redis failed. const TxFailedErr = internal.RedisError("redis: transaction failed") // Tx implements Redis transactions as described in @@ -24,7 +24,8 @@ func (c *Client) newTx() *Tx { connPool: pool.NewStickyConnPool(c.connPool.(*pool.ConnPool), true), }, } - tx.setProcessor(tx.Process) + tx.baseClient.init() + tx.statefulCmdable.setProcessor(tx.Process) return &tx } @@ -42,7 +43,7 @@ func (c *Client) Watch(fn func(*Tx) error, keys ...string) error { return err } -// close closes the transaction, releasing any open resources. +// Close closes the transaction, releasing any open resources. func (c *Tx) Close() error { _ = c.Unwatch().Err() return c.baseClient.Close() @@ -75,9 +76,9 @@ func (c *Tx) Unwatch(keys ...string) *StatusCmd { func (c *Tx) Pipeline() Pipeliner { pipe := Pipeline{ - exec: c.pipelineExecer(c.txPipelineProcessCmds), + exec: c.processTxPipeline, } - pipe.setProcessor(pipe.Process) + pipe.statefulCmdable.setProcessor(pipe.Process) return &pipe } |