Skip to content

Commit

Permalink
Add some more debug logging to updates
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasselmeci committed May 21, 2024
1 parent fa54522 commit e44ebba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/webapp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,13 @@ def update_topology(self) -> None:
ok = self.maybe_update_topology_repo()
if ok:
try:
log.debug("Updating topology RG data")
self.topology.update(rg_reader.get_topology(self.topology_dir, self.get_contacts_data(), strict=self.strict))
log.debug("Updated topology RG data successfully")
except Exception:
if self.strict:
raise
log.exception("Failed to update topology")
log.exception("Failed to update topology RG data")
self.topology.try_again()
else:
self.topology.try_again()
Expand All @@ -339,7 +341,9 @@ def get_vos_data(self) -> Optional[VOsData]:
ok = self.maybe_update_topology_repo()
if ok:
try:
log.debug("Updating VOs")
self.vos_data.update(vo_reader.get_vos_data(self.vos_dir, self.get_contacts_data(), strict=self.strict))
log.debug("Updated VOs successfully")
except Exception:
if self.strict:
raise
Expand All @@ -360,7 +364,9 @@ def get_projects(self) -> Optional[Dict]:
ok = self.maybe_update_topology_repo()
if ok:
try:
log.debug("Updating projects")
self.projects.update(project_reader.get_projects(self.projects_dir, strict=self.strict))
log.debug("Updated projects successfully")
except Exception:
if self.strict:
raise
Expand All @@ -383,7 +389,9 @@ def get_mappings(self, strict=None) -> Optional[mappings.Mappings]:
ok = self.maybe_update_topology_repo()
if ok:
try:
log.debug("Updating mappings")
self.mappings.update(mappings.get_mappings(indir=self.mappings_dir, strict=strict))
log.debug("Updated mappings successfully")
except Exception:
if self.strict:
raise
Expand Down

0 comments on commit e44ebba

Please sign in to comment.