mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-15 05:25:25 +00:00
fix: improve context handling in projections (#3638)
* fix: improve context handling in projections * fix tests * use as of system time for current sequence * use as of system time for current sequence Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package crdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -21,8 +22,8 @@ type instanceSequence struct {
|
||||
sequence uint64
|
||||
}
|
||||
|
||||
func (h *StatementHandler) currentSequences(query func(string, ...interface{}) (*sql.Rows, error)) (currentSequences, error) {
|
||||
rows, err := query(h.currentSequenceStmt, h.ProjectionName)
|
||||
func (h *StatementHandler) currentSequences(ctx context.Context, query func(context.Context, string, ...interface{}) (*sql.Rows, error)) (currentSequences, error) {
|
||||
rows, err := query(ctx, h.currentSequenceStmt, h.ProjectionName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user