Beispiel #1
0
 def get_projects(self) -> Dict:
     if self.projects.should_update():
         ok = self._update_topology_repo()
         self.projects.update(project_reader.get_projects(
             self.projects_dir),
                              bump_timestamp=ok)
     return self.projects.data
Beispiel #2
0
    def get_projects(self) -> Dict:
        if self.projects.should_update():
            ok = self._update_topology_repo()
            if ok:
                self.projects.update(project_reader.get_projects(self.projects_dir))
            else:
                self.projects.try_again()

        return self.projects.data
Beispiel #3
0
    def get_projects(self) -> Dict:
        if self.projects.should_update():
            ok = self._update_topology_repo()
            if ok:
                try:
                    self.projects.update(project_reader.get_projects(self.projects_dir, strict=self.strict))
                except Exception:
                    if self.strict:
                        raise
                    log.exception("Failed to update projects")
                    self.projects.try_again()
            else:
                self.projects.try_again()

        return self.projects.data
Beispiel #4
0
def miscproject_xml():
    global _projects
    if not _projects:
        _projects = get_projects()
    projects_xml = to_xml_bytes(_projects)
    return Response(projects_xml, mimetype='text/xml')