more metrics
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 31s

This commit is contained in:
matst80
2024-11-09 11:49:11 +01:00
parent cfbb2e29c2
commit 23c3cae9b9
3 changed files with 12 additions and 2 deletions

View File

@@ -81,6 +81,7 @@ func (p *GrainLocalPool) GetGrains() map[CartId]*CartGrain {
func (p *GrainLocalPool) GetGrain(id CartId) (*CartGrain, error) {
var err error
grain, ok := p.grains[id]
grainLookups.Inc()
if grain == nil || !ok {
if len(p.grains) >= p.PoolSize {
if p.expiry[0].Expires.Before(time.Now()) {