Cache jobs in pool manager

This change caches jobs meant for an entity in the pool manager. This
allows us to avoid querying the db as much and allows us to better determine
when we should scale down.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2025-10-04 19:20:14 +00:00 committed by Gabriel
parent 0093393bc3
commit a36d01afd5
13 changed files with 331 additions and 73 deletions

View file

@ -71,6 +71,7 @@ func newDBConn(dbCfg config.Database) (conn *gorm.DB, err error) {
if dbCfg.Debug {
conn = conn.Debug()
}
return conn, nil
}