def inc_total(self, value=1): """Increases the total times this point gets visited :param value: value to increases :type value: integer """ if value <= 0: raise db.BadValueError() if value == 1: RouteCounter.increase_counter(self.key()) else: for i in xrange(1, value): RouteCounter.increase_counter(self.key())
def total(self): """The total time this point gets visited""" return RouteCounter.get_count(self.key())