Пример #1
0
 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())
Пример #2
0
 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())
Пример #3
0
 def total(self):
     """The total time this point gets visited"""
     return RouteCounter.get_count(self.key())
Пример #4
0
 def total(self):
     """The total time this point gets visited"""
     return RouteCounter.get_count(self.key())