Exemplo n.º 1
0
    def postUpdateHook(cls, teams, updated_attr_list, is_new_list):
        """
        To run after models have been updated
        """
        for (team, updated_attrs) in zip(teams, updated_attr_list):
            try:
                LocationHelper.update_team_location(team)
            except Exception, e:
                logging.error("update_team_location for {} errored!".format(team.key.id()))
                logging.exception(e)

            try:
                SearchHelper.update_team_location_index(team)
            except Exception, e:
                logging.error("update_team_location_index for {} errored!".format(team.key.id()))
                logging.exception(e)
Exemplo n.º 2
0
    def postUpdateHook(cls, teams, updated_attr_list, is_new_list):
        """
        To run after models have been updated
        """
        for (team, updated_attrs) in zip(teams, updated_attr_list):
            try:
                LocationHelper.update_team_location(team)
            except Exception, e:
                logging.error("update_team_location for {} errored!".format(
                    team.key.id()))
                logging.exception(e)

            try:
                SearchHelper.update_team_location_index(team)
            except Exception, e:
                logging.error(
                    "update_team_location_index for {} errored!".format(
                        team.key.id()))
                logging.exception(e)
Exemplo n.º 3
0
 def get(self, team_key):
     team = Team.get_by_id(team_key)
     SearchHelper.update_team_awards_index(team)
     SearchHelper.update_team_location_index(team)