]> mj.ucw.cz Git - eval.git/commitdiff
Fixed pipeline.insert args order
authorTomas Gavenciak <gavento@ucw.cz>
Sat, 18 Sep 2010 15:28:23 +0000 (17:28 +0200)
committerTomas Gavenciak <gavento@ucw.cz>
Sat, 18 Sep 2010 15:28:23 +0000 (17:28 +0200)
t/moe/exts/dummy.py
t/moe/tasktypes/dummy.py

index a0e2dab0d4cf33fef786a84e3f50eec19ef00548..7a070a25f52712c4df5aff8e04d907603c5feda5 100644 (file)
@@ -9,14 +9,14 @@ def init(e):
       
     def hook_m_0(self):
        e.log.info('Hey! It\'s me, the dummy extension in your main pipeline! (at time 0)')
-    e.main_pipe.insert(hook_m_0, 'exts.dummy.hook_m_0', 0)
+    e.main_pipe.insert(0, 'exts.dummy.hook_m_0', hook_m_0)
     
     def hook_m_79(self):
        e.log.info('Me, the dummy extension, requies no cleanup! (at time 79)')
-    e.main_pipe.insert(hook_m_79, 'exts.dummy.hook_m_79', 79) 
+    e.main_pipe.insert(79, 'exts.dummy.hook_m_79', hook_m_79) 
     
     def hook_t_42(self):
        t = 'It\'s test %s and the dummy extension did nothing! (at time 42)' % e['TEST']
        e.log.info(t)
        e.log.user.info(t)
-    e.test_pipe.insert(hook_t_42, 'exts.dummy.hook_t_42', 42) 
+    e.test_pipe.insert(42, 'exts.dummy.hook_t_42', hook_t_42) 
index 20e358414b9e1fe7c5492b7ec21c8a235006a77f..446c4e79a8377bcafb91b253322652d92e95fbb6 100644 (file)
@@ -11,7 +11,7 @@ def init(e):
     def hook_m_50(self):
        e.log.info('Here should be compiling')
 
-    e.main_pipe.insert(hook_m_50, 'dummy tasktype hook_m_50', 50)
+    e.main_pipe.insert(50, 'dummy tasktype hook_m_50', hook_m_50)
     
     def hook_m_60(self):
        e.log.info('Here should be test pipeline running')
@@ -27,9 +27,9 @@ def init(e):
             e.test_pipeline.run()
             testvar.remove_operation(op)
     
-    e.main_pipe.insert(hook_m_60, 'dummy tasktype hook_m_60', 60) 
+    e.main_pipe.insert(60, 'dummy tasktype hook_m_60', hook_m_60) 
     
     def hook_t_30(self):
        e.log.info("Maybe we should do something? Nah...")
     
-    e.test_pipe.insert(hook_t_30, 'dummy tasktype hook_t_30', 30) 
+    e.test_pipe.insert(30, 'dummy tasktype hook_t_30', hook_t_30)