62
}
63
65
>
quota := c.calculator.GetQuota(namespace)
66
>
c.getOrCreateQuotaLogger(namespace).updateQuota(quota)
67
>
return quota
68
>
}
69
70
func (c *LoggedNamespaceCalculator) getOrCreateQuotaLogger(
71
namespace string,
73
>
c.quotaLoggersLock.Lock()
74
>
defer c.quotaLoggersLock.Unlock()
75
>
76
>
quotaLogger, ok := c.quotaLoggers[namespace]
77
>
if !ok {
78
>
quotaLogger = newQuotaLogger(log.With(c.logger, tag.WorkflowNamespace(namespace)))
79
>
c.quotaLoggers[namespace] = quotaLogger
80
>
}
81
83
}
84