fix ticket priming in hooks
This commit is contained in:
@@ -758,12 +758,12 @@ func (b *IdentityAccessManagementAPIBuilder) BeginRoleUpdate(ctx context.Context
|
|||||||
|
|
||||||
// Grab a ticket to write to Zanzana
|
// Grab a ticket to write to Zanzana
|
||||||
wait := time.Now()
|
wait := time.Now()
|
||||||
b.zTickets <- true
|
<-b.zTickets
|
||||||
hooksWaitHistogram.WithLabelValues(roleType, "update").Observe(time.Since(wait).Seconds()) // Record wait time
|
hooksWaitHistogram.WithLabelValues(roleType, "update").Observe(time.Since(wait).Seconds()) // Record wait time
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
defer func() {
|
defer func() {
|
||||||
<-b.zTickets
|
b.zTickets <- true
|
||||||
}()
|
}()
|
||||||
|
|
||||||
b.logger.Debug("updating role permissions in zanzana",
|
b.logger.Debug("updating role permissions in zanzana",
|
||||||
|
|||||||
Reference in New Issue
Block a user