1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Add WrapProcessPipeline

This commit is contained in:
yifei.huang
2018-01-20 18:26:33 +08:00
committed by Vladimir Mihailenco
parent 2c11cbf01a
commit 8b4fa6d443
8 changed files with 174 additions and 109 deletions

7
tx.go
View File

@ -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
}
@ -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
}