Do not clobber pools and scaleset caches on update
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
d0c9462a5d
commit
90200ffa71
1 changed files with 3 additions and 5 deletions
8
cache/entity_cache.go
vendored
8
cache/entity_cache.go
vendored
|
|
@ -50,7 +50,7 @@ func (e *EntityCache) SetEntity(entity params.GithubEntity) {
|
|||
e.mux.Lock()
|
||||
defer e.mux.Unlock()
|
||||
|
||||
_, ok := e.entities[entity.ID]
|
||||
cache, ok := e.entities[entity.ID]
|
||||
if !ok {
|
||||
e.entities[entity.ID] = EntityItem{
|
||||
Entity: entity,
|
||||
|
|
@ -59,10 +59,8 @@ func (e *EntityCache) SetEntity(entity params.GithubEntity) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
e.entities[entity.ID] = EntityItem{
|
||||
Entity: entity,
|
||||
}
|
||||
cache.Entity = entity
|
||||
e.entities[entity.ID] = cache
|
||||
}
|
||||
|
||||
func (e *EntityCache) ReplaceEntityPools(entityID string, pools []params.Pool) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue