mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
fix: initiate cache only when lighthouse config is active
This commit is contained in:
@@ -34,9 +34,6 @@ const renderBanner = ({ message, href, gradient }: BannerConfig) => (
|
||||
// If recommendation is being processed, returns a banner with a different message
|
||||
export const LighthouseBanner = async () => {
|
||||
try {
|
||||
// Triggers a background job to process the scans and generate recommendations
|
||||
await initializeTenantCache();
|
||||
|
||||
const lighthouseConfig = await getLighthouseConfig();
|
||||
|
||||
if (!lighthouseConfig) {
|
||||
@@ -48,6 +45,11 @@ export const LighthouseBanner = async () => {
|
||||
});
|
||||
}
|
||||
|
||||
// If lighthouse is active, trigger background job to process the scans and generate recommendations
|
||||
if (lighthouseConfig.attributes.is_active) {
|
||||
await initializeTenantCache();
|
||||
}
|
||||
|
||||
// Check if recommendation is being processed
|
||||
const isProcessing = await CacheService.isRecommendationProcessing();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user