1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Allow passing context where possible

This commit is contained in:
Vladimir Mihailenco
2019-06-04 13:30:47 +03:00
parent 3da4357c0c
commit 09eb108738
9 changed files with 98 additions and 51 deletions

6
tx.go
View File

@ -56,7 +56,11 @@ func (c *Tx) WithContext(ctx context.Context) *Tx {
}
func (c *Tx) Process(cmd Cmder) error {
return c.baseClient.process(cmd)
return c.ProcessContext(c.ctx, cmd)
}
func (c *Tx) ProcessContext(ctx context.Context, cmd Cmder) error {
return c.baseClient.process(ctx, cmd)
}
// Watch prepares a transaction and marks the keys to be watched