Created
March 18, 2014 20:17
-
-
Save erikbern/9628609 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import luigi | |
# Here we are importing our own tasks, provided they are | |
# arranged in a python module (folder) named "components" | |
from components.SomeTaskA import SomeTaskA | |
from components.SomeTaskB import SomeTaskB | |
from components.SomeTaskC import SomeTaskC | |
# ------------------------------------------ | |
# DEFINE THE MAIN WORKFLOW DEPENDENCY GRAPH | |
# ------------------------------------------ | |
class MyTaskB(SomeTaskB): | |
def requires(self): | |
return SomeTaskA() | |
class MyTaskC(SomeTaskC): | |
def requires(self): | |
return SomeTaskB() | |
# Build (and run) the workflow | |
luigi.build(MyTaskC(), workers=16, local_scheduler=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment