etwist/server.py
changeset 2708 60d728bdcba5
parent 2705 30bcdbd92820
child 2711 7aee3bd7a704
--- a/etwist/server.py	Wed Aug 05 19:12:10 2009 +0200
+++ b/etwist/server.py	Wed Aug 05 19:13:35 2009 +0200
@@ -36,12 +36,12 @@
     lc.start(interval)
 
 def start_looping_tasks(repo):
-    for interval, func in repo._looping_tasks:
+    for interval, func, args in repo._looping_tasks:
         repo.info('starting twisted task %s with interval %.2fs',
                   func.__name__, interval)
-        def catch_error_func(repo=repo, func=func):
+        def catch_error_func(repo=repo, func=func, args=args):
             try:
-                func()
+                func(*args)
             except:
                 repo.exception('error in looping task')
         start_task(interval, catch_error_func)