def check(self): threading.Timer(60, self.check).start() # start the new round of checks self.runner.increment_round() # take note of the round now # if the current round does not finish before next one starts, we will enter the wrong round current_round = self.runner.round database = DataAccess() # Get teams from DB, loop through and check each service teams = database.get_teams() for team in teams: for service in team.services: self.runner.check_service(service) # after all teams are checked, deposit into DB (whole round at once) database.add_check_round(teams, current_round) # generate chart for web interface teams = database.get_scores() self.chart_gen.generate_chart(current_round, teams)