Skip to content

Commit

Permalink
[fix] Multiple situations indicate that the inventory is not ready (#200
Browse files Browse the repository at this point in the history
)
  • Loading branch information
aquamatthias authored Dec 5, 2023
1 parent 44bd74f commit 45a79f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fixbackend/inventory/inventory_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from fixbackend.graph_db.service import GraphDatabaseAccessManager
from fixbackend.ids import CloudNames
from fixbackend.ids import NodeId
from fixbackend.inventory.inventory_client import InventoryClient, GraphDatabaseNotAvailable, AsyncIteratorWithContext
from fixbackend.inventory.inventory_client import InventoryClient, AsyncIteratorWithContext, InventoryException
from fixbackend.inventory.schemas import (
AccountSummary,
ReportSummary,
Expand Down Expand Up @@ -386,8 +386,8 @@ def overall_score(accounts: Dict[str, AccountSummary]) -> int:
top_checks=tops,
)

except GraphDatabaseNotAvailable:
log.warning("Graph database not available yet. Returning empty summary.")
except InventoryException as ex:
log.warning(f"Inventory not available yet: {ex}. Returning empty summary.")
empty = CheckSummary(
available_checks=0,
failed_checks=0,
Expand Down

0 comments on commit 45a79f5

Please sign in to comment.