コード例 #1
0
ファイル: test_worker_job.py プロジェクト: kmike/celery
 def test_execute_using_pool(self):
     tid = gen_unique_id()
     tw = TaskWrapper(mytask.name, tid, [4], {"f": "x"})
     p = TaskPool(2)
     p.start()
     asyncres = tw.execute_using_pool(p)
     self.assertEqual(asyncres.get(), 256)
     p.stop()
コード例 #2
0
ファイル: test_worker_job.py プロジェクト: idan/celery
 def test_execute_using_pool(self):
     tid = gen_unique_id()
     tw = TaskWrapper("cu.mytask", tid, mytask, [4], {"f": "x"})
     p = TaskPool(2)
     p.start()
     asyncres = tw.execute_using_pool(p)
     self.assertTrue(asyncres.get(), 256)
     p.stop()