( ctx context.Context, cn *pool.Conn, cmds []Cmder, )
| 1210 | } |
| 1211 | |
| 1212 | func (c *baseClient) pipelineProcessCmds( |
| 1213 | ctx context.Context, cn *pool.Conn, cmds []Cmder, |
| 1214 | ) (bool, error) { |
| 1215 | // Process any pending push notifications before executing the pipeline |
| 1216 | if err := c.processPushNotifications(ctx, cn); err != nil { |
| 1217 | internal.Logger.Printf(ctx, "push: error processing pending notifications before writing pipeline: %v", err) |
| 1218 | } |
| 1219 | |
| 1220 | if err := cn.WithWriter(c.context(ctx), c.opt.WriteTimeout, func(wr *proto.Writer) error { |
| 1221 | return writeCmds(wr, cmds) |
| 1222 | }); err != nil { |
| 1223 | setCmdsErr(cmds, err) |
| 1224 | return true, err |
| 1225 | } |
| 1226 | |
| 1227 | if err := cn.WithReader(c.context(ctx), c.opt.ReadTimeout, func(rd *proto.Reader) error { |
| 1228 | // read all replies |
| 1229 | return c.pipelineReadCmds(ctx, cn, rd, cmds) |
| 1230 | }); err != nil { |
| 1231 | return true, err |
| 1232 | } |
| 1233 | |
| 1234 | return false, nil |
| 1235 | } |
| 1236 | |
| 1237 | func (c *baseClient) pipelineReadCmds(ctx context.Context, cn *pool.Conn, rd *proto.Reader, cmds []Cmder) error { |
| 1238 | for i, cmd := range cmds { |
nothing calls this directly
no test coverage detected