fix: set context in connection getter
@@ -100,9 +100,9 @@ func NewPersister(c *pop.Connection, r Dependencies, config configuration.Provid
func (p *Persister) Connection(ctx context.Context) *pop.Connection {
if c := ctx.Value(transactionContextKey); c != nil {
- return c.(*pop.Connection)
+ return c.(*pop.Connection).WithContext(ctx)
}
- return p.conn
+ return p.conn.WithContext(ctx)
}
func (p *Persister) transaction(ctx context.Context, f func(ctx context.Context, c *pop.Connection) error) error {
