mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
25 lines
468 B
Go
25 lines
468 B
Go
package spooler
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
|
|
es_locker "github.com/zitadel/zitadel/internal/eventstore/v1/locker"
|
|
)
|
|
|
|
const (
|
|
lockTable = "auth.locks"
|
|
)
|
|
|
|
type locker struct {
|
|
dbClient *sql.DB
|
|
}
|
|
|
|
func NewLocker(client *sql.DB) *locker {
|
|
return &locker{dbClient: client}
|
|
}
|
|
|
|
func (l *locker) Renew(lockerID, viewModel, instanceID string, waitTime time.Duration) error {
|
|
return es_locker.Renew(l.dbClient, lockTable, lockerID, viewModel, instanceID, waitTime)
|
|
}
|