Add cache worker
Add dedicated worker to maintain cache. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
e49b35d3d0
commit
d0c9462a5d
13 changed files with 355 additions and 208 deletions
|
|
@ -1595,13 +1595,6 @@ func (r *basePoolManager) cleanupOrphanedRunners(runners []*github.Runner) error
|
|||
}
|
||||
|
||||
func (r *basePoolManager) Start() error {
|
||||
// load pools in cache
|
||||
pools, err := r.store.ListEntityPools(r.ctx, r.entity)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to list pools: %w", err)
|
||||
}
|
||||
cache.ReplaceEntityPools(r.entity.ID, pools)
|
||||
|
||||
initialToolUpdate := make(chan struct{}, 1)
|
||||
go func() {
|
||||
slog.Info("running initial tool update")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue