Skip to content

Commit d62ef60

Browse files
committed
RHINENG-25948: add ff for refreshing advisory cache
1 parent 6b850ba commit d62ef60

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

tasks/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ var (
2525
EnablePackagesSync = utils.PodConfig.GetBool("packages_sync", true)
2626
// Toggle repo sync in vmaas_sync
2727
EnableReposSync = utils.PodConfig.GetBool("repos_sync", true)
28+
// Toggle advisory cache refresh in vmaas_sync
29+
EnableAdvisoryCacheRefresh = utils.PodConfig.GetBool("advisory_cache_refresh", true)
2830
// Sync data in vnass_sync based on timestamp
2931
EnableModifiedSinceSync = utils.PodConfig.GetBool("modified_since_sync", true)
3032
// Page size for /errata vmass API call

tasks/vmaas_sync/vmaas_sync.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ func SyncData(lastModifiedTS *types.Rfc3339TimestampWithZ, vmaasExportedTS *type
113113
}
114114

115115
// refresh caches
116-
caches.RefreshAdvisoryCaches()
116+
if tasks.EnableAdvisoryCacheRefresh {
117+
caches.RefreshAdvisoryCaches()
118+
} else {
119+
utils.LogInfo("Advisory cache refresh is disabled")
120+
}
117121

118122
utils.LogInfo("Data sync finished successfully")
119123
return nil

0 commit comments

Comments
 (0)