@@ -0,0 +1,607 @@
+import luigi%0Aimport time%0Aimport os%0Aimport shutil%0A%0A%0A@luigi.expose%0Aclass Foo(luigi.Task):%0A    def run(self):%0A        print %22Running Foo%22%0A%0A    def requires(self):%0A        return (Bar(i) for i in xrange(10))%0A%0A%0A@luigi.expose%0Aclass Bar(luigi.Task):%0A    num = luigi.IntParameter()%0A%0A    def run(self):%0A        time.sleep(1)%0A        self.output().open('w').close()%0A%0A    def output(self):%0A        return luigi.LocalTarget('/tmp/bar/%25d' %25 self.num)%0A%0A%0Aif __name__ == %22__main__%22:%0A    if os.path.exists('/tmp/bar'):%0A        shutil.rmtree('/tmp/bar')%0A%0A    luigi.run(%5B'--task', 'Foo', '--workers', '5'%5D, use_optparse=True)%0A

Add foo example for multiple workers