mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-24 04:22:35 +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:
@@ -67,7 +67,7 @@ func (h *locker) handleLock(ctx context.Context, errs chan error, lockDuration t
|
||||
|
||||
func (h *locker) renewLock(ctx context.Context, lockDuration time.Duration, instanceID string) error {
|
||||
//the unit of crdb interval is seconds (https://www.cockroachlabs.com/docs/stable/interval.html).
|
||||
res, err := h.client.Exec(h.lockStmt, h.workerName, lockDuration.Seconds(), h.projectionName, instanceID)
|
||||
res, err := h.client.ExecContext(ctx, h.lockStmt, h.workerName, lockDuration.Seconds(), h.projectionName, instanceID)
|
||||
if err != nil {
|
||||
return errors.ThrowInternal(err, "CRDB-uaDoR", "unable to execute lock")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user