Last active
April 29, 2021 02:49
-
-
Save tameem92/fb81df44b0c7b91266f3dc717bffa5e6 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
from dag_factory.process_invoices import ProcessInvoices | |
from dag_factory.process_messages import ProcessMessages | |
class DAGFactory(): | |
"""The DAG Factory Class""" | |
def __init__(self, environment_config=None): | |
self.environment_config = environment_config | |
def create(self, dag_type, config: list): | |
supported_dags = { | |
'ProcessInvoices': ProcessInvoices, | |
'ProcessMessages': ProcessMessages | |
} | |
dag = supported_dags[dag_type]( | |
config=config, | |
environment_config=self.environment_config | |
) | |
return dag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment