server/utils.py
branchstable
changeset 4714 fccda6dd91bf
parent 4212 ab6573088b4a
child 5066 bf5cbc351e99
equal deleted inserted replaced
4713:785299dfc2c0 4714:fccda6dd91bf
   105             finally:
   105             finally:
   106                 self.start()
   106                 self.start()
   107         self.func = auto_restart_func
   107         self.func = auto_restart_func
   108         self.name = func.__name__
   108         self.name = func.__name__
   109 
   109 
       
   110     def __str__(self):
       
   111         return '%s (%s seconds)' % (self.name, self.interval)
       
   112 
   110     def start(self):
   113     def start(self):
   111         self._t = Timer(self.interval, self.func)
   114         self._t = Timer(self.interval, self.func)
   112         self._t.start()
   115         self._t.start()
   113 
   116 
   114     def cancel(self):
   117     def cancel(self):