diff --git a/ui/components/lighthouse/banner.tsx b/ui/components/lighthouse/banner.tsx index 9c07c6e655..707028910b 100644 --- a/ui/components/lighthouse/banner.tsx +++ b/ui/components/lighthouse/banner.tsx @@ -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();