server/utils.py
changeset 2708 60d728bdcba5
parent 2105 92ea410806fe
child 3585 cd437d24aa65
--- a/server/utils.py	Wed Aug 05 19:12:10 2009 +0200
+++ b/server/utils.py	Wed Aug 05 19:13:35 2009 +0200
@@ -96,11 +96,11 @@
 
 class LoopTask(object):
     """threaded task restarting itself once executed"""
-    def __init__(self, interval, func):
+    def __init__(self, interval, func, args):
         self.interval = interval
-        def auto_restart_func(self=self, func=func):
+        def auto_restart_func(self=self, func=func, args=args):
             try:
-                func()
+                func(*args)
             finally:
                 self.start()
         self.func = auto_restart_func